mirror of
https://github.com/prowler-cloud/prowler.git
synced 2025-12-19 05:17:47 +00:00
Co-authored-by: Alan Buscaglia <alanbuscaglia@MacBook-Pro.local> Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com> Co-authored-by: César Arroba <cesar@prowler.com> Co-authored-by: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com>
33 lines
910 B
TypeScript
33 lines
910 B
TypeScript
import { AuthForm } from "@/components/auth/oss";
|
|
import { getAuthUrl, isGithubOAuthEnabled } from "@/lib/helper";
|
|
import { 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 GOOGLE_AUTH_URL = getAuthUrl("google");
|
|
const GITHUB_AUTH_URL = getAuthUrl("github");
|
|
|
|
return (
|
|
<AuthForm
|
|
type="sign-up"
|
|
invitationToken={invitationToken}
|
|
googleAuthUrl={GOOGLE_AUTH_URL}
|
|
githubAuthUrl={GITHUB_AUTH_URL}
|
|
isGoogleOAuthEnabled={isGoogleOAuthEnabled}
|
|
isGithubOAuthEnabled={isGithubOAuthEnabled}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default SignUp;
|