File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export async function getToken<R extends boolean = false>(
7171 const {
7272 req,
7373 secureCookie = process . env . NEXTAUTH_URL ?. startsWith ( "https://" ) ??
74- ! ! process . env . VERCEL_URL ,
74+ ! ! process . env . VERCEL ,
7575 cookieName = secureCookie
7676 ? "__Secure-next-auth.session-token"
7777 : "next-auth.session-token" ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export type NextAuthAction =
5050export interface InternalOptions < T extends ProviderType = any > {
5151 providers : InternalProvider [ ]
5252 /**
53- * Parsed from `NEXTAUTH_URL` or `VERCEL_URL` .
53+ * Parsed from `NEXTAUTH_URL` or `x-forwarded-host` on Vercel .
5454 * @default "http://localhost:3000/api/auth"
5555 */
5656 url : InternalUrl
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function setCookie(res, cookie: Cookie) {
1717/** Extract the host from the environment */
1818export function detectHost ( forwardedHost : any ) {
1919 // If we detect a Vercel environment, we can trust the host
20- if ( process . env . VERCEL === "1" ) return forwardedHost
20+ if ( process . env . VERCEL ) return forwardedHost
2121 // If `NEXTAUTH_URL` is `undefined` we fall back to "http://localhost:3000"
2222 return process . env . NEXTAUTH_URL
2323}
You can’t perform that action at this time.
0 commit comments