* convert AuthKit example to use new SDK
* clean up and fixes
* remove vite dep in start-server-core
* fix(examples): remove unnecessary dotenv import from WorkOS example
Vite automatically loads .env files, so the manual dotenv.config() call is unnecessary and causes a build failure since dotenv is not installed as a dependency.
* fix lint issue
* fix(examples): fix WorkOS AuthKit sign-in and sign-out
- Add parentheses to handleCallbackRoute() in callback route
- Add reloadDocument to logout Links to prevent CORS errors
- Upgrade SDK to v0.5.0 and remove unused dependencies
The sign-out was failing with CORS errors because client-side
navigation via server functions caused fetch to follow the external
redirect to WorkOS. Using reloadDocument forces a full page navigation,
allowing the server to return a proper HTTP redirect.
* fix(examples): use re-exported User type from authkit package
Import User from @workos/authkit-tanstack-react-start instead of
@workos-inc/node to fix tsc --noEmit failure in CI. The authkit
package already re-exports this type to avoid server-only deps
in client code.
* fix(examples): restore authkit-tanstack-react-start dependency
Replace @workos-inc/node with @workos/authkit-tanstack-react-start
in the WorkOS example. The code imports from the authkit package,
not the low-level node SDK.
---------
Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>