Open paulfalgout opened 2 weeks ago
hey @paulfalgout , could you give a bit more context? (how to reproduce, what type of environment, etc.).
Our implementation of this library is here: https://github.com/RoundingWell/care-ops-frontend/blob/develop/src/js/auth/workos.js
Pretty sure if you
import { createClient } from '@workos-inc/authkit-js';
await createClient(clientId);
then wait the token expiration time + 1000 and you'll see that in the console.
Having this same issue... Looks like this only happens when devMode={false}
@paulfalgout we need to do a better job with that error.
For security reasons, we rely on passing the refresh token in an http only cookie to the WorkOS API in production.
What’s likely happening is that you haven’t yet set up a custom domain, so some browsers are blocking your WorkOS session cookie as a 3rd party cookie (this is the reason we use the localstorage in development — we want to avoid that 3rd party cookie blocking).
And then modify apiHostname
in the createClientOptions
like await createClient(clientId, { apiHostname: authenticationapi.com });
?
From the timeout https://github.com/workos/authkit-js/blob/cdef77b7c38479897d7ebc7e446c7d47dc69d9a4/src/create-client.ts#L159