MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / Signup

Function Signup

packages/web/src/app/signup/page.tsx:19–48  ·  view source on GitHub ↗
(props: LoginProps)

Source from the content-addressed store, hash-verified

17}
18
19export default async function Signup(props: LoginProps) {
20 const searchParams = await props.searchParams;
21 const session = await auth();
22 if (session) {
23 logger.info("Session found in signup page, redirecting to home");
24 return redirect("/");
25 }
26
27 const org = await __unsafePrisma.org.findUnique({ where: { id: SINGLE_TENANT_ORG_ID } });
28 if (!org || !org.isOnboarded) {
29 return redirect("/onboard");
30 }
31
32 const anonymousAccessEnabled = await isAnonymousAccessEnabled();
33
34 return (
35 <div className="flex flex-col min-h-screen bg-backgroundSecondary">
36 <div className="flex-1 flex flex-col items-center p-4 sm:p-12 w-full">
37 <LoginForm
38 callbackUrl={searchParams.callbackUrl}
39 error={searchParams.error}
40 context="signup"
41 isAnonymousAccessEnabled={anonymousAccessEnabled}
42 hideSecurityNotice={env.EXPERIMENT_ASK_GH_ENABLED === 'true'}
43 />
44 </div>
45 <Footer />
46 </div>
47 )
48}

Callers

nothing calls this directly

Calls 2

isAnonymousAccessEnabledFunction · 0.90
redirectFunction · 0.85

Tested by

no test coverage detected