Replies: 5 comments 16 replies
-
Hi, would #823 solve this issue? |
Beta Was this translation helpful? Give feedback.
-
There is a temporary workaround that can be used to achieve this! Before this handler in your file: Add a method that sets a cookie:
Now in [...nextauth].ts, we need to make change such that authOptions is just a function that returns next-auth callbacks and config like:
|
Beta Was this translation helpful? Give feedback.
-
Any update on this ? Here is an example of use : Allow a new user to specify its username on signup. Currently, I believe I have to do this in a separate step. EDIT: So I can just do that : And inside the signIn callback : To access the request object, you need to use the nextAuth advanced initialization : https://next-auth.js.org/configuration/initialization |
Beta Was this translation helpful? Give feedback.
-
I'm not able to pass any parameters using the above solutions. any workarounds as of today? |
Beta Was this translation helpful? Give feedback.
-
for strava provider with nextauth5 beta, I can pass parameters like this (they will be sent as get params in url to strava when initation oauth), maybe it works similar with other providers providers: [
Strava({
clientId: process.env.STRAVA_CLIENT_ID,
clientSecret: process.env.STRAVA_CLIENT_SECRET,
authorization: {
params: { scope: 'read,activity:read' }
}
})
], |
Beta Was this translation helpful? Give feedback.
-
Your question
How can I pass additional parameters to signIn with email function to use on callback?
Cant find passed values on the sign in callback
What are you trying to do
Im trying to add an additional "name" parameter to the signIn() function, along with the email and callback url.
Currently Im using the prisma adapter and would like to add a value to the native "name" property that the schema requires you to have.
Feedback
https://next-auth.js.org/schemas/adapters
https://next-auth.js.org/getting-started/client#signin
signIn("email", { email: email, callbackUrl: userCallbackUrl, name: 'Test Name', })
Beta Was this translation helpful? Give feedback.
All reactions