Replies: 1 comment
-
In provider callback, or, in sing-in callback - that would be great too. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Your question
How to add additional data during the signin / register process and use it in provider callback.
What are you trying to do
On the front-end user fills in 10 fields form and clicks register button
signIn('credentials', { info: myFormInfo }, { someotherinfo: myFormInfo})
In the credentials provider
async authorize(credentials)
function in credentials I have access toinfo
variable. Which is exactly what I want.someotherinfo
is nowhere to be found, not exposed, I think. That's fine.Sadly, if I use
signIn('spotify', { info: myFormInfo }, { someotherinfo: myFormInfo})
, in the only availableprofile
function in the provider, I can't getinfo
andsomeotherinfo
- any of them will do.Note I believe that using 3rd parameter should not be used for my goals, but I keep it here, as a reference.
Question history
There are several questions on the board that are loosely connected to the topic (including one by me).
#1363
#901
#562
Last one introduce an ability to add additional parameters to the /authorize endpoint through the third argument of signIn() which is cool, but not what I want.
I want to access both those parameters and parameters from second argument of signIn in provider callback and, probably, on signIn callback.
Beta Was this translation helpful? Give feedback.
All reactions