File tree Expand file tree Collapse file tree
packages/web/src/app/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { DividerSet } from "@/app/components/dividerSet";
99import { ProviderButton } from "@/app/components/providerButton" ;
1010import { AuthSecurityNotice } from "@/app/components/authSecurityNotice" ;
1111import type { IdentityProviderMetadata } from "@/lib/identityProviders" ;
12+ import Link from "next/link" ;
1213
1314interface AuthMethodSelectorProps {
1415 providers : IdentityProviderMetadata [ ] ;
@@ -44,6 +45,15 @@ export const AuthMethodSelector = ({
4445 const hasCredentials = providers . some ( p => p . purpose === "sso" && p . id === "credentials" ) ;
4546 const hasMagicLink = providers . some ( p => p . purpose === "sso" && p . id === "nodemailer" ) ;
4647
48+ if ( oauthProviders . length === 0 && ! hasCredentials && ! hasMagicLink ) {
49+ return (
50+ < div className = "flex flex-col items-center justify-center w-full gap-2" >
51+ < p className = "text-center font-medium" > No authentication methods available. Please contact your administrator to configure authentication.</ p >
52+ < Link href = "https://docs.sourcebot.dev/docs/configuration/auth/overview" target = "_blank" rel = "noopener" className = "text-link hover:underline" > Learn more</ Link >
53+ </ div >
54+ )
55+ }
56+
4757 return (
4858 < >
4959 < AuthSecurityNotice closable = { securityNoticeClosable } />
You can’t perform that action at this time.
0 commit comments