Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cookie not set during initial code exchange #59

Open
4 tasks done
coel opened this issue Apr 15, 2024 · 0 comments
Open
4 tasks done

Bug: Cookie not set during initial code exchange #59

coel opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@coel
Copy link
Member

coel commented Apr 15, 2024

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 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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant