mirror of
https://github.com/supabase/supabase.git
synced 2026-06-23 01:08:27 +08:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES/NO ## What kind of change does this PR introduce? Bug fix, feature, docs update, ... ## What is the current behavior? Please link any relevant issues here. ## What is the new behavior? Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added “Continue with {provider}” sign-in and sign-up flows using enabled external identity providers. * Enabled inbound branding to focus a specific provider for customized sign-in/sign-up experiences. * **Improvements** * Refined the sign-in options layout and “last used” tracking for clearer authentication choices. * Updated account identity/provider connection experiences (link/unlink and management UI). * **Bug Fixes** * Fixed hydration mismatches in sign-in and password-related layouts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
21 lines
772 B
TypeScript
21 lines
772 B
TypeScript
import { useMemo } from 'react'
|
|
|
|
import { useIsFeatureEnabled } from './useIsFeatureEnabled'
|
|
import {
|
|
GITHUB_IDENTITY_PROVIDER,
|
|
type ExternalIdentityProviderConfig,
|
|
} from '@/lib/external-identity-providers'
|
|
|
|
/**
|
|
* Returns the statically-declared identity providers whose feature flag is currently enabled.
|
|
* To add a provider: declare its config in `lib/external-identity-providers.ts`, add a
|
|
* `dashboard_auth:sign_in_with_*` flag, and gate it here.
|
|
*/
|
|
export function useEnabledIdentityProviders(): ExternalIdentityProviderConfig[] {
|
|
const { dashboardAuthSignInWithGithub: githubEnabled } = useIsFeatureEnabled([
|
|
'dashboard_auth:sign_in_with_github',
|
|
])
|
|
|
|
return useMemo(() => [...(githubEnabled ? [GITHUB_IDENTITY_PROVIDER] : [])], [githubEnabled])
|
|
}
|