Skip to content

chore(auth): remove the Google sign-in page; Profile Cloud signs in with the editor's Keycloak token — hold until auth cutover - #190

Closed
kkerti wants to merge 5 commits into
mainfrom
auth-oidc
Closed

kkerti wants to merge 5 commits into
mainfrom
auth-oidc

Conversation

@kkerti

@kkerti kkerti commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Profile Cloud has no sign-in UI of its own. The editor signs in to Keycloak and posts { event, providerId: "oidc", idToken } into the web component; src/lib/stores.ts signs that ID token into Firebase through the oidc.is-auth (production) or oidc.is-auth-dev (development) provider. The bridge is console-side: those providers point at the Keycloak issuer (https://<host>/realms/intechstudio) and client id grid-editor, so every Firebase uid stays as it is and no code here knows the identity provider.

This branch removes the old Google sign-in path and makes the token hand-off idempotent:

 src/
-├── routes/authorize/+page.svelte      # Google hand-off page for the old grid-editor://?credential= deep link
-├── lib/components/GoogleAuth.svelte
 ├── lib/stores.ts                        # skip signInWithCredential when the editor re-posts the same token
-└── app.d.ts                             # declare var google
 .github/workflows/*                      # PUBLIC_GOOGLE_CLIENT_ID removed
 README.md                                # Authentication: how the bridge works
authenticateUser({ event, idToken })
  logout                         -> signOut
  same token, already signed in  -> skip (the editor re-posts on remount)
  otherwise                      -> signInWithCredential(oidc.is-auth[-dev], idToken)

A refreshed ID token is a new token, so each editor refresh signs in to Firebase again (one signInWithIdp per refresh, about every 4 minutes per open editor with the current 5-minute access token).

Evidence

  • Before: sign-in needed /authorize with Google Identity Services and a grid-editor://?credential= deep link back to the editor.
  • After, against a local Keycloak over a tunnel, with oidc.is-auth-dev pointed at it and a local development build of this branch:
    • Desktop dev editor: signed in to Profile Cloud through oidc.is-auth-dev.
    • Web editor: Keycloak ID token without nonce, picture or name claims; signInWithIdp 200, panel signed in; a token refresh keeps it signed in; editor sign-out signs Profile Cloud out.
    • Re-post guard: an identical token skips; refreshed, after-logout and rejected-then-retried tokens sign in.
    • grep -rni "authorize\|GoogleAuth\|GOOGLE_CLIENT" src is empty; build and build:webcomponent pass.

Merge Danger

Door: one-way for released editors. Editors before the rework open <profileCloudUrl>/authorize for Google sign-in, which this removes.

Hold until the auth cutover: deploy together with the editor release (stage 2), after the oidc.is-auth provider in the profile-cloud console points at https://auth.intech.studio/realms/intechstudio.

Blast Radius: sign-in from released editors.

Local testing: the editor mounts <profile-cloud-prod> for a plain URL, so build with WEB_COMPONENT_NAME=profile-cloud-prod PUBLIC_APP_ENV=development npm run build:webcomponent. npm run build empties public/, including public/wc.

🤖 Generated with Claude Code

kkerti and others added 4 commits November 4, 2026 01:59
The editor signs in through Logto now, so the Google Identity Services
hand-off and PUBLIC_GOOGLE_CLIENT_ID have no callers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The editor posts its ID token on every panel remount and token refresh.
A changed token still signs in, and a rejected one can be retried.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit b18df85):

https://profile-cloud-dev--pr190-auth-oidc-0he4ha1o.web.app

(expires Thu, 17 Dec 2026 16:08:56 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2a004f867edf1347070dd9beedb18755187a6d4e

@kkerti kkerti changed the title chore(auth): remove the /authorize page and Google button — hold until auth cutover chore(auth): remove the Google sign-in page; Profile Cloud signs in with the editor's Keycloak token — hold until auth cutover Nov 18, 2026
@kkerti

kkerti commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Closing unmerged. The Firebase bridge is dropped: Profile Cloud moves to its own backend, which verifies the editor's Keycloak ID token directly. Nothing here ships.

@kkerti kkerti closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant