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.empty response. The auth host shows Keycloak only for
client=axon-proto with a console, switchboard, wallboard or localhost
returnTo, for example
https://auth.ng911.dev/login?client=axon-proto&returnTo=https%3A%2F%2Fwallboard.ng911.dev%2F.
Where Okta shows too, pick Keycloak. Sign in with the Keycloak account you
were provisioned with (UX Core uses +uxcore@axon.com aliases), not your
regular Okta email. Then open
https://auth.ng911.dev/api/auth/session?client=axon-proto and export the
accessToken:iss is https://iam-service-dev-eu-west-1.carbyneapi-dev.com/auth/realms/carbyne.azp is c-operator-client.scope includes prepared-claims.prepared_user_id is present.?client=responder: it returns a Doorkeeper token. See
Authentication for which tokens the router
accepts. The account's email must match a Prepared user, or Rails answers
empty response; the per-user keycloak-login flag and MFA can also block
it. Ask Niklaus Buskirk for provisioning.{ currentUser { id } } and no token. Expect HTTP 401 with
{"errors":[{"message":"unauthorized"}]}.-H "authorization: Bearer $TOKEN" to the
currentUser call. Expect HTTP 200 with your user. If you get data: null with Failed to fetch from Subgraph 'prepared911',
Rails refused the token.scripts/smoke-subscription.mjs:userNotification event within a few seconds and exit code 0.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.
Instead of editing that file, you can put
VITE_GRAPHQL_ROUTER_URL=<the router URL, $H> in
apps/responder/.env.local; appConfig.json still wins when it sets a
URL.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.
Expect:graphql-transport-ws) goes connection_init,
connection_ack, then subscribe for OnUserNotification;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.pnpm dev:console:dev-router writes the router
URL into the console's dev config (desktop/.axon911/console/appConfig.json)
and starts the console with auth on. Set GRAPHQL_ROUTER_URL first to use
another router. pnpm dev:console:desktop and node desktop/scripts/run-local.mjs
also default the console's router URL to the dev router when none is set. Run apps/auth with the Keycloak lines from step 6 and pick
Unified. There is no responder shortcut: the responder already signs in with
Keycloak by default, so step 6 is all it needs.GRAPHQL_ROUTER_URL in the runtime config, /config/appConfig.json.VITE_GRAPHQL_ROUTER_URL, set when the shell is built.appConfig.json, with no rebuild. The committed appConfig.json files are
{}, so a deployment gets its URL from VITE_GRAPHQL_ROUTER_URL. Without
either, the responder and console have no router client and switchboard
uses its offline client.VITE_ variable into
the bundle, so it is visible to anyone who loads the shell. Put only the
router's public URL in it, never a token, key, or a URL with credentials.https:, or http: for localhost, with no username
or password. Anything else is ignored with one [graphql-router] ignoring ... warning
in the browser console, which names the variable and not its value.responder, console and switchboard
projects, then redeploy; the steps are in
DEPLOY-VERCEL.mdopens in a new tab.