Best way to retrieve user data from a cognito access token

0

Hi, I am curious to know about the cognito endpoint quota and the best practices when designing a robust login authentication system. Is it wise to call the getuser() method with access token to get the user data like username or is there any other better way? Looking forward to an answer.

1 Antwort
0

Hi

I think the information you need is included in either the ID or Access token, both should be returned when the user login. You could fetch the information by decoding the JWT based tokens.

See: Using the ID token and Using tokens with user pools

profile picture
EXPERTE
beantwortet vor 10 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen