Skip to content

fix: don't reject accounts linked to a third-party provider - #8

Merged
Lookoff-AIMLAPI merged 1 commit into
mainfrom
aimlapi-oauth-allow-linked-providers
Aug 25, 2026
Merged

fix: don't reject accounts linked to a third-party provider#8
Lookoff-AIMLAPI merged 1 commit into
mainfrom
aimlapi-oauth-allow-linked-providers

Conversation

@Lookoff-AIMLAPI

Copy link
Copy Markdown
Member

`sign-in/code/verify` has no dependency on how the account was originally created (Google, GitHub, password) — confirmed by reading the backend handler (`apps/app/auth/src/controllers/v1/auth.controller.ts`): it authorizes purely on proof of email ownership via the emailed code, looking the user up by email/code alone.

The blanket rejection I added for any `checkAccount().provider` was an unfounded assumption — OpenClaude's own onboarding UI (`ProviderManager.tsx`) never branches on that field, only on `action`. Removed the rejection so Google/GitHub-linked accounts can sign in through the same code flow instead of being told to create a key manually.

Test plan

  • Updated test: a `sign-in` account with `provider: "google"` now completes the code flow and mints a key, instead of throwing.
  • Full `packages/ai` suite passes; `tsgo --noEmit` clean; bundle rebuilds.

sign-in/code/verify has no dependency on how the account was originally
created (Google, GitHub, password) — it authorizes purely on proof of email
ownership via the emailed code, confirmed by reading the backend handler.
The blanket rejection for any checkAccount().provider was an unfounded
assumption on my part: OpenClaude's own onboarding UI never branches on
that field either, it only looks at `action`. Removed the rejection so
Google/GitHub-linked accounts can sign in through the same code flow.
@Lookoff-AIMLAPI
Lookoff-AIMLAPI merged commit 2075eb1 into main Aug 25, 2026
3 checks passed
@Lookoff-AIMLAPI
Lookoff-AIMLAPI deleted the aimlapi-oauth-allow-linked-providers branch August 25, 2026 12:22
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