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
In order to maintain a session without exposing the tokens to client code, Kinde sets a cookie (when using custom domains only). This cookie is only set when the fetch has credentials set to include. The SDK does this when refreshing the token, but not when initially exchanging for the token after auth.
Work around is after calling handleRedirectToApp() to call refreshTokens() which does a token refresh and sets the cookie.
Prerequisites
Describe the issue
In order to maintain a session without exposing the tokens to client code, Kinde sets a cookie (when using custom domains only). This cookie is only set when the
fetch
hascredentials
set toinclude
. The SDK does this when refreshing the token, but not when initially exchanging for the token after auth.Work around is after calling
handleRedirectToApp()
to callrefreshTokens()
which does a token refresh and sets the cookie.Reference for how this is handled in the other JS SDK: https://github.com/kinde-oss/kinde-auth-pkce-js/blob/main/src/createKindeClient.ts#L285
Library URL
https://github.com/kinde-oss/kinde-typescript-sdk
Library version
2.8.0
Operating system(s)
macOS
Operating system version(s)
Sonoma 14.4.1
Further environment details
No response
Reproducible test case URL
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: