Skip to content

Commit 2268b94

Browse files
msukkariclaude
andcommitted
feat(web): hide security notice when EXPERIMENT_ASK_GH_ENABLED is true
Hide the "Authentication data is managed by your deployment" security notice on login and signup pages when the EXPERIMENT_ASK_GH_ENABLED flag is enabled. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 7d2d4bb commit 2268b94

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

packages/web/src/app/login/components/loginForm.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ interface LoginFormProps {
1414
providers: IdentityProviderMetadata[];
1515
context: "login" | "signup";
1616
isAnonymousAccessEnabled?: boolean;
17+
hideSecurityNotice?: boolean;
1718
}
1819

19-
export const LoginForm = ({ callbackUrl, error, providers, context, isAnonymousAccessEnabled = false }: LoginFormProps) => {
20+
export const LoginForm = ({ callbackUrl, error, providers, context, isAnonymousAccessEnabled = false, hideSecurityNotice = false }: LoginFormProps) => {
2021
const captureEvent = useCaptureEvent();
2122

2223
const safeCallbackUrl = useMemo(() => {
@@ -89,6 +90,7 @@ export const LoginForm = ({ callbackUrl, error, providers, context, isAnonymousA
8990
context={context}
9091
onProviderClick={handleProviderClick}
9192
securityNoticeClosable={true}
93+
hideSecurityNotice={hideSecurityNotice}
9294
/>
9395
<p className="text-sm text-muted-foreground mt-8">
9496
{context === "login" ?

packages/web/src/app/login/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getOrgFromDomain } from "@/data/org";
77
import { SINGLE_TENANT_ORG_DOMAIN } from "@/lib/constants";
88
import { getAnonymousAccessStatus } from "@/actions";
99
import { isServiceError } from "@/lib/utils";
10+
import { env } from "@sourcebot/shared";
1011

1112
interface LoginProps {
1213
searchParams: Promise<{
@@ -40,6 +41,7 @@ export default async function Login(props: LoginProps) {
4041
providers={providers}
4142
context="login"
4243
isAnonymousAccessEnabled={isAnonymousAccessEnabled}
44+
hideSecurityNotice={env.EXPERIMENT_ASK_GH_ENABLED === 'true'}
4345
/>
4446
</div>
4547
<Footer />

packages/web/src/app/signup/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { LoginForm } from "../login/components/loginForm";
33
import { redirect } from "next/navigation";
44
import { Footer } from "@/app/components/footer";
55
import { getIdentityProviderMetadata } from "@/lib/identityProviders";
6-
import { createLogger } from "@sourcebot/shared";
6+
import { createLogger, env } from "@sourcebot/shared";
77
import { getOrgFromDomain } from "@/data/org";
88
import { SINGLE_TENANT_ORG_DOMAIN } from "@/lib/constants";
99
import { getAnonymousAccessStatus } from "@/actions";
@@ -44,6 +44,7 @@ export default async function Signup(props: LoginProps) {
4444
providers={providers}
4545
context="signup"
4646
isAnonymousAccessEnabled={isAnonymousAccessEnabled}
47+
hideSecurityNotice={env.EXPERIMENT_ASK_GH_ENABLED === 'true'}
4748
/>
4849
</div>
4950
<Footer />

0 commit comments

Comments
 (0)