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
Would you consider adding the following to the /src/routes/callback.js file, under provider.type === 'credentials'?
if(user.isNewUser&&pages.newUser){return{redirect: `${pages.newUser}${pages.newUser.includes("?") ? "&" : "?"}callbackUrl=${encodeURIComponent(callbackUrl)}`,
cookies
};}
I edited my local package to allow redirection for credentials as I wanted a single place for this, but I figured it should be easy enough to add into the official Next Auth package (unless there's a reason this was avoided)? My edit was just copy and pasted code from the oauth and email provider types.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Would you consider adding the following to the /src/routes/callback.js file, under provider.type === 'credentials'?
I edited my local package to allow redirection for credentials as I wanted a single place for this, but I figured it should be easy enough to add into the official Next Auth package (unless there's a reason this was avoided)? My edit was just copy and pasted code from the oauth and email provider types.
Beta Was this translation helpful? Give feedback.
All reactions