Call the dev Cosmo router with a real token, check subscriptions, and point a local responder at it
currentUser returning 401 without a token and 200
with one, a WebSocket connection_ack, and a live userNotification event in
the responder.
Set the router URL once. It is the Cosmo router's dev URL from
AxonMundi onboarding:
https://auth.ng911.dev/login?client=axon-proto&returnTo=https%3A%2F%2Fswitchboard.ng911.dev%2F.
The returnTo matters: without a console, switchboard, wallboard or
localhost returnTo, axon-proto offers only Okta, and an Okta token is
refused. Then open
https://auth.ng911.dev/api/auth/session?client=axon-proto and export the
accessToken:
?client=responder: it returns a Doorkeeper token. See
Authentication for which tokens the router
accepts.
-4 flag is there because the VPN has no
IPv6:
{ currentUser { id } }. Expect a 401.
-H "authorization: Bearer $TOKEN". Expect your
user. If you get data: null with Failed to fetch from Subgraph 'prepared911',
Rails refused the token.
scripts/smoke-subscription.mjs:
Cannot return null for non-nullable field 'Subscription.userNotification'.
This is likely on the Rails and AnyCable side, which Niklaus Buskirk is
debugging. Real events still arrive after it.
apps/responder/public/config/appConfig.json, set:
AUTH_HOST_URL is the local apps/auth host that the next steps run.
apps/responder/src/config/mundi.ts, drop
|| auth.clientId !== AuthClientId.Responder.
apps/auth/.env, uncomment the KEYCLOAK_ISSUER, KEYCLOAK_CLIENT_ID
and KEYCLOAK_SCOPE lines from .env.example. Without them the local
sign-in offers only Okta.
apps/auth, then pnpm dev:responder, and sign in with Keycloak.
pnpm --filter core dev (port 5109) alongside the shell. The prod
core remote can lag trunk, and then the navbar crashes with
reading 'stroke'.
currentUser and subscribes to userNotification.
CORS errors on mf-manifest.json are expected when the remotes are not served
locally. The router calls had no CORS errors: the router allows any origin,
and the responder sends no cookies.