SSO: allow to sign in using providerId #720

Closed
opened 2026-03-13 08:01:37 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @kamilkisiela on GitHub (Feb 21, 2025).

Is this suited for github?

  • Yes, this is suited for github

We're trying to migrate from SuperTokens to Better Auth and the missing piece for us is the ability to sign in (SSO) using provider's id, instead of a domain, an email or an organization's slug.

We can't use email or domain, because OIDC configurations of our users do not contain domain.

Describe the solution you'd like

// same story with authClient.signIn.sso
await auth.api.signInSSO({
  body: {
    providerId: "test",
    callbackURL: "/dashboard",
  },
});

Describe alternatives you've considered

Setting up an organization, with a slug, for every organization in our app feels like unnecessary complexity, as we already have a concept of organization and member roles.

Additional context

No response

Originally created by @kamilkisiela on GitHub (Feb 21, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. We're trying to migrate from SuperTokens to Better Auth and the missing piece for us is the ability to sign in (SSO) using provider's id, instead of a domain, an email or an organization's slug. We can't use `email` or `domain`, because OIDC configurations of our users do not contain `domain`. ### Describe the solution you'd like ```ts // same story with authClient.signIn.sso await auth.api.signInSSO({ body: { providerId: "test", callbackURL: "/dashboard", }, }); ``` ### Describe alternatives you've considered Setting up an organization, with a slug, for every organization in our app feels like unnecessary complexity, as we already have a concept of organization and member roles. ### Additional context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#720