-
-
Notifications
You must be signed in to change notification settings - Fork 29
feat: Handle splitted next-auth.session-token cookie #167
base: main
Are you sure you want to change the base?
feat: Handle splitted next-auth.session-token cookie #167
Conversation
Hebilicious
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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