https://supertokens.com/ logo
#support-questions
get users email
# support-questions
k

Kranos

03/18/2023, 9:52 PM
Is there a simple way of retrieving a user email once they've signed in in the same way you retrieve userId with
await Session.getUserId()
? I couldn't see how to do it from the Get User Info documentation: https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/get-user-info
r

rp

03/19/2023, 5:33 AM
hey @Kranos
you can add the user's email into their access token payload by overriding the createNewSession function. This way, you can access the email just like you access the userId
k

Kranos

03/19/2023, 8:27 AM
Awesome, thanks - I'll take a look!