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
The default value of callbackUrl should be specifiable securely as an option on the server.
Purpose of proposed feature
While the client-side signIn function provides a dynamic, location-based fallback for callbackUrl, an API call to /api/auth/signin/* has process.env.NEXTAUTH_URL hardcoded as the fallback value.
Detail about proposed feature
importtype{NextApiRequest,NextApiResponse}from"next";importNextAuth,{InitOptions}from"next-auth";constoptions: InitOptions={pages: {// `process.env.NEXTAUTH_URL` could be prepended automaticallydefaultCallback: "/auth/callback",},};exportdefault(req: NextApiRequest,res: NextApiResponse)=>NextAuth(req,res,options);
Potential problems
There could be a mismatch between the client and the server by introducing a new defaultCallback URL on the server. The client shouldn’t infer a callbackUrl (based on window.location) after this feature is implemented.
The text was updated successfully, but these errors were encountered:
Summary of proposed feature
The default value of
callbackUrl
should be specifiable securely as an option on the server.Purpose of proposed feature
While the client-side
signIn
function provides a dynamic, location-based fallback forcallbackUrl
, an API call to/api/auth/signin/*
hasprocess.env.NEXTAUTH_URL
hardcoded as the fallback value.Detail about proposed feature
Potential problems
There could be a mismatch between the client and the server by introducing a new
defaultCallback
URL on the server. The client shouldn’t infer acallbackUrl
(based onwindow.location
) after this feature is implemented.The text was updated successfully, but these errors were encountered: