feat: Handle splitted next-auth.session-token cookie#167
feat: Handle splitted next-auth.session-token cookie#167jals1212 wants to merge 12 commits intoHebilicious:mainfrom
Conversation
Hebilicious
left a comment
There was a problem hiding this comment.
This is looking great !
Thanks for working on this ❤️
|
@Hebilicious Any progress on this PR? I am having the issue with getServerToken returning Null on the current npm version 😿 Thanks for this wonderful package, I hope to continue to use this. |
Hello there. |
🔗 Linked issue
#139
#160
❓ Type of change
📚 Description
RuntimeConfigtypings updated.useAuth'ssessionTokenreturns the cookie handled bymakeSessionCookie(handles splitted session token).NuxtAuthHandlerusesgetAuthJsSecretif receives no token fromAuthConfig.getServerTokenusesmakeCookiesFromHeadersto manage cookies.getAuthJsSecret: gets the secret from runtime or env vars.getConfigBaseUrl: gets the baseUrl from runtime or env vars.checkOrigin: uses getConfigBaseUrlgetServerOrigin: uses getConfigBaseUrl.mergeCookieObject: merges cookies.makeSessionCookie: gets the next-auth.session-token (handles splitted session token).makeCookiesFromHeaders: manage multiple 'set-cookie' and makes native Headers.makeNativeHeaders: made it an utility.makeNativeHeadersFromCookieObject: uses makeNativeHeaders.Resolves the '
getServerTokenreturns null issue'.#139
#160
📝 Checklist