Skip to content

feat(auth): support custom providers via custom: prefix in Provider type#2134

Merged
mandarini merged 2 commits intomasterfrom
cemal/feat-support-custom-providers-as-param
Feb 24, 2026
Merged

feat(auth): support custom providers via custom: prefix in Provider type#2134
mandarini merged 2 commits intomasterfrom
cemal/feat-support-custom-providers-as-param

Conversation

@cemalkilic
Copy link
Contributor

Add custom:${string} template literal to the Provider type union and SignInWithIdTokenCredentials.provider, allowing custom OIDC providers (e.g. custom:my-company) to be passed to signInWithOAuth, signInWithIdToken, and linkIdentity.

No runtime changes needed as the provider string is passed directly to the server.

@cemalkilic cemalkilic requested review from a team as code owners February 24, 2026 09:01
@github-actions github-actions bot added the auth-js Related to the auth-js library. label Feb 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a808c54 and 8eadc27.

📒 Files selected for processing (2)
  • packages/core/auth-js/src/lib/types.ts
  • packages/core/auth-js/test/GoTrueClient.test.ts

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for custom OIDC providers using the custom: prefix convention for sign-in flows.
    • Custom providers now integrate seamlessly with OAuth and ID token authentication methods.
  • Tests

    • Expanded test coverage to validate custom OIDC provider behavior across OAuth sign-in and ID token sign-in scenarios.

Walkthrough

The changes extend the authentication type system to support custom OIDC providers through a template-literal naming convention. The Provider type now accepts provider names matching the pattern custom:${string}, and the SignInWithIdTokenCredentials type is updated to accommodate this new provider format. Corresponding test cases are added to verify OAuth sign-in flows and ID token sign-in behavior with custom OIDC providers, ensuring the type system changes are properly covered by the test suite.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 24, 2026

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2134

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2134

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2134

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2134

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2134

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2134

commit: 8eadc27

@mandarini mandarini merged commit 4b00d5d into master Feb 24, 2026
18 checks passed
@mandarini mandarini deleted the cemal/feat-support-custom-providers-as-param branch February 24, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth-js Related to the auth-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants