# Invitation Login Loader

## Why this note exists

The template login route now handles WorkOS `invitation_token` links without flashing the normal tenant sign-in card before redirecting to hosted AuthKit.

## Applies to

- Template-derived apps that accept WorkOS organization invitations through `ui/src/routes/login.tsx`.
- Apps using `@elevasis/ui/features/auth` for shared auth UI helpers.

## Required actions

1. Pull the latest template sync changes.
2. Install dependencies so `@elevasis/ui` resolves to the released version that exports `AuthRedirectLoadingScreen`.
3. Keep any tenant-specific WorkOS env values, especially `VITE_WORKOS_ORG_ID`, in the app environment.

## Verification

- Open `/login?invitation_token=test-token` and confirm the app shows a neutral gray full-screen loader while redirecting.
- Run `pnpm -C ui check-types`.
- Run `pnpm -C ui test src/routes/__tests__/auth-routes.test.tsx` when the project carries the template auth route tests.

## Not handled by /git-sync

`/git-sync` transports commits only. It does not accept invitations, configure WorkOS invitation URLs, set tenant WorkOS org IDs, or smoke-test the hosted AuthKit redirect in production.
