It's me again 😅 Is there a way to get the user e...
# support-questions-legacy
b
It's me again 😅 Is there a way to get the user email in
getRedirectionURL
? I would like to redirect to a route with the email as query parameters after the thirdParty signInUp
r
You mean right after the user has logged in?
b
Yes
r
You mean right after the user has logged in? If yes, then you can modify the access token payload on the backend during session creation to add the email and read it from the session payload
b
Alright, and how can I read the session payload ?
using Session recipe ?
Oh I think I found my answer
r
Yes. Correct.
b
What is the best practice to modify the access token payload ? Should I override the create session function ?
r
yea, if you want to add something to the payload during session creation. Otherwise you can modify the payload at some later time as well using the
session.updateAccessTokenPayload
function
b
Okay, and do you have an idea of how could I get the user email in the createNewSession function override ? Do I have to use ThirdPartyEmailPassword.getUserById(input.userId) ? Or is it a bad implementation
r
thats perfectly fine!
2 Views