Describe the bug
Setting WORKOS_COOKIE_DOMAIN has no effect in @workos/authkit-tanstack-react-start. The session cookie is written without a Domain attribute, so it can't be shared across subdomains. The equivalent env var works fine in @workos-inc/authkit-nextjs.
The only way to get the domain applied is to call configure({ cookieDomain: '...' }) from @workos/authkit-session manually before the service initializes.
To Reproduce
Steps to reproduce the behavior:
- Start from the official tanstack example: https://github.com/TanStack/router/tree/main/examples/react/start-workos
- Add
WORKOS_COOKIE_DOMAIN=app.localhost (alongside the usual WORKOS_* vars) to .env.
- Sign in and inspect the
Set-Cookie response header for the wos-session cookie (DevTools → Network, or Application → Cookies).
- The cookie is written with no
Domain attribute, WORKOS_COOKIE_DOMAIN is ignored.
Expected behavior
WORKOS_COOKIE_DOMAIN should be read from the environment and applied as the Domain attribute of the session cookie, with parity to @workos-inc/authkit-nextjs, without needing a manual configure() call.
Desktop (please complete the following information):
- OS: macOS Tahoe 26.5.1
- Browser: chrome
@workos/authkit-tanstack-react-start version: >=0.5.0 (also happening in latest 0.11.0)
@workos/authkit-session version: >=0.3.4 (also happening in latest 0.7.1)
- Tanstack Start version: 1.168.27
Additional context
@workos-inc/authkit-nextjs reads WORKOS_COOKIE_DOMAIN directly through its own env-variables.ts, so it's unaffected — this is specific to the @workos/authkit-session ConfigurationProvider used by the TanStack (and other framework) adapters.
Describe the bug
Setting
WORKOS_COOKIE_DOMAINhas no effect in@workos/authkit-tanstack-react-start. The session cookie is written without aDomainattribute, so it can't be shared across subdomains. The equivalent env var works fine in@workos-inc/authkit-nextjs.The only way to get the domain applied is to call
configure({ cookieDomain: '...' })from@workos/authkit-sessionmanually before the service initializes.To Reproduce
Steps to reproduce the behavior:
WORKOS_COOKIE_DOMAIN=app.localhost(alongside the usualWORKOS_*vars) to.env.Set-Cookieresponse header for thewos-sessioncookie (DevTools → Network, or Application → Cookies).Domainattribute,WORKOS_COOKIE_DOMAINis ignored.Expected behavior
WORKOS_COOKIE_DOMAINshould be read from the environment and applied as theDomainattribute of the session cookie, with parity to@workos-inc/authkit-nextjs, without needing a manualconfigure()call.Desktop (please complete the following information):
@workos/authkit-tanstack-react-startversion: >=0.5.0 (also happening in latest 0.11.0)@workos/authkit-sessionversion: >=0.3.4 (also happening in latest 0.7.1)Additional context
@workos-inc/authkit-nextjsreadsWORKOS_COOKIE_DOMAINdirectly through its ownenv-variables.ts, so it's unaffected — this is specific to the@workos/authkit-sessionConfigurationProviderused by the TanStack (and other framework) adapters.