-
Notifications
You must be signed in to change notification settings - Fork 3
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
HTTP: 400 on authenticate with missing refresh-token when devMode=false (refresh-token not persisted correctly) #44
Comments
@Oyveloper I'll push up a fix for the instructions you referenced. You must pass |
ok, so
|
@Oyveloper it should be your auth domain, but you need a custom auth domain so that the session cookie can be set properly. If you don't have a custom domain, just keep |
Hmm ok, perhaps the |
@Oyveloper we don't recommend running in devMode in production. Having the refresh token in local storage is less secure than the httponly cookie (this might be an acceptable amount of risk for your app). You won't be able to use the authkit.app domain (it's not an API endpoint, and also 3rd party cookie blocking will prevent the cookie from being set properly). Our recommendation for SPAs is to register a custom domain with WorkOS and use that as your |
So you say we need to pay the $99/month for custom domain in order to use the more secure option? |
We recently set up auth-kit-react with TanStack (i.e. fully client side), following the instructions on https://workos.com/docs/user-management/client-only/2-add-authkit-to-your-app
Locally, all is fine as devMode is True, and refresh-token is stored in local storage.
When deploying the site however, we get a 400 error whenever auth-kit tries to reauthenticate, as it does not pass the refresh-token.
However, setting devMode true works well also in production.
Anyone got an idea why the prod setup does not work in our case?
Our test-setup to debug:
The text was updated successfully, but these errors were encountered: