mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 02:04:06 +00:00
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
38 lines
986 B
TypeScript
38 lines
986 B
TypeScript
import { AuthForm } from "@/components/auth/oss";
|
|
import {
|
|
getAuthUrl,
|
|
isGithubOAuthEnabled,
|
|
isGoogleOAuthEnabled,
|
|
} from "@/lib/helper";
|
|
import { SearchParamsProps } from "@/types";
|
|
|
|
const SignUp = async ({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<SearchParamsProps>;
|
|
}) => {
|
|
const resolvedSearchParams = await searchParams;
|
|
const invitationToken =
|
|
typeof resolvedSearchParams?.invitation_token === "string"
|
|
? resolvedSearchParams.invitation_token
|
|
: null;
|
|
const isCloudEnv = process.env.NEXT_PUBLIC_IS_CLOUD_ENV === "true";
|
|
|
|
const GOOGLE_AUTH_URL = getAuthUrl("google");
|
|
const GITHUB_AUTH_URL = getAuthUrl("github");
|
|
|
|
return (
|
|
<AuthForm
|
|
type="sign-up"
|
|
invitationToken={invitationToken}
|
|
isCloudEnv={isCloudEnv}
|
|
googleAuthUrl={GOOGLE_AUTH_URL}
|
|
githubAuthUrl={GITHUB_AUTH_URL}
|
|
isGoogleOAuthEnabled={isGoogleOAuthEnabled}
|
|
isGithubOAuthEnabled={isGithubOAuthEnabled}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default SignUp;
|