You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to pass a property (inviteToken) from the frontend's signIn request to the OAuth provider (Google in my case) and then use this property in the backend's signIn callback. As you can see from the method signature of signIn it says the second param will be be passed with the body of the sign-in request:
That seems to only work for the credentials provider...no problem because the third param says it will be passed along as the authorizationParams to the provider. Using this param I can send my inviteToken to Google's side and I see it included in the callbackUrl so I know it's getting passed back to my system but these custom authorizationParams seem to be dropped by Nuxt/Nextjs Auth as the account, credentials, profile, and user objects in the signIn callback don't include my inviteToken. Here in the next-auth repo you can see them working out the temporary solution of using cookies to store any data pre-auth to be used in/post auth. I can easily do this on the frontend but not inside of any of the callbacks of NuxtAuthHandler because we're not provided with the H3 event 😞. Any thoughts on a solution?
Additional information
No response
The text was updated successfully, but these errors were encountered:
Thanks @joneath for the question + the good description of it + treying out so much already.
Sadly, I cannot get around it right now but will leave it open for others to hopefully share some info. Have you figured out something in the meantime?
Ask your question
I need to pass a property (
inviteToken
) from the frontend'ssignIn
request to the OAuth provider (Google in my case) and then use this property in the backend'ssignIn
callback. As you can see from the method signature ofsignIn
it says the second param will be be passed with the body of the sign-in request:That seems to only work for the credentials provider...no problem because the third param says it will be passed along as the
authorizationParams
to the provider. Using this param I can send myinviteToken
to Google's side and I see it included in the callbackUrl so I know it's getting passed back to my system but these customauthorizationParams
seem to be dropped by Nuxt/Nextjs Auth as the account, credentials, profile, and user objects in thesignIn
callback don't include myinviteToken
. Here in the next-auth repo you can see them working out the temporary solution of using cookies to store any data pre-auth to be used in/post auth. I can easily do this on the frontend but not inside of any of the callbacks ofNuxtAuthHandler
because we're not provided with the H3 event 😞. Any thoughts on a solution?Additional information
No response
The text was updated successfully, but these errors were encountered: