mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-04 17:56:38 +00:00
add my-device and force login
This commit is contained in:
@@ -25,12 +25,14 @@ export default async function Page(props: {
|
||||
const user = await getUser({ skipCheckVerifyEmail: true });
|
||||
|
||||
const isInvite = searchParams?.redirect?.includes("/invite");
|
||||
const forceLoginParam = searchParams?.forceLogin;
|
||||
const forceLogin = forceLoginParam === "true";
|
||||
|
||||
const env = pullEnv();
|
||||
|
||||
const signUpDisabled = env.flags.disableSignupWithoutInvite;
|
||||
|
||||
if (user) {
|
||||
if (user && !forceLogin) {
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
@@ -96,7 +98,7 @@ export default async function Page(props: {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<DashboardLoginForm redirect={redirectUrl} idps={loginIdps} />
|
||||
<DashboardLoginForm redirect={redirectUrl} idps={loginIdps} forceLogin={forceLogin} />
|
||||
|
||||
{(!signUpDisabled || isInvite) && (
|
||||
<p className="text-center text-muted-foreground mt-4">
|
||||
|
||||
Reference in New Issue
Block a user