feat : use guide login only [no ci]
This commit is contained in:
@@ -2,16 +2,13 @@ import { SiteHeader } from "@/components/public/site-header";
|
||||
import { EmailActionForm } from "@/components/auth/email-action-form";
|
||||
import { connection } from "next/server";
|
||||
import { safeAuthReturnPath } from "@/lib/auth/return-path";
|
||||
import { isSudlohOidcEnabled } from "@/lib/auth/server";
|
||||
|
||||
export const instant = false;
|
||||
|
||||
export default async function ForgotPasswordPage({ searchParams }: PageProps<"/auth/forgot-password">) {
|
||||
await connection();
|
||||
const { next } = await searchParams;
|
||||
const oidcEnabled = isSudlohOidcEnabled();
|
||||
const oidcOnly = oidcEnabled && process.env.SUDLOH_OIDC_ONLY === "true";
|
||||
return <div className="min-h-svh"><SiteHeader /><main className="grid min-h-[calc(100svh-4rem)] place-items-center p-4">
|
||||
<EmailActionForm mode="forgot" nextPath={safeAuthReturnPath(next)} oidcEnabled={oidcEnabled} oidcOnly={oidcOnly} />
|
||||
<EmailActionForm mode="forgot" nextPath={safeAuthReturnPath(next)} />
|
||||
</main></div>;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ export const instant = false;
|
||||
|
||||
export default async function LoginPage({ searchParams }: PageProps<"/auth/login">) {
|
||||
await connection();
|
||||
const { next, verified, error, sudloh } = await searchParams;
|
||||
const oidcError = sudloh === "1" && typeof error === "string" ? error : undefined;
|
||||
const { next, verified, error } = await searchParams;
|
||||
return <AccountPage mode="login" next={next} verified={verified === "1" && !error}
|
||||
verificationError={typeof error === "string" && !oidcError} oidcError={oidcError} />;
|
||||
verificationError={typeof error === "string"} />;
|
||||
}
|
||||
|
||||
@@ -2,17 +2,14 @@ import { connection } from "next/server";
|
||||
import { SiteHeader } from "@/components/public/site-header";
|
||||
import { EmailActionForm } from "@/components/auth/email-action-form";
|
||||
import { safeAuthReturnPath } from "@/lib/auth/return-path";
|
||||
import { isSudlohOidcEnabled } from "@/lib/auth/server";
|
||||
|
||||
export const instant = false;
|
||||
|
||||
export default async function ResetPasswordPage({ searchParams }: PageProps<"/auth/password-reset">) {
|
||||
await connection();
|
||||
const { token, error, next } = await searchParams;
|
||||
const oidcEnabled = isSudlohOidcEnabled();
|
||||
const oidcOnly = oidcEnabled && process.env.SUDLOH_OIDC_ONLY === "true";
|
||||
return <div className="min-h-svh"><SiteHeader /><main className="grid min-h-[calc(100svh-4rem)] place-items-center p-4">
|
||||
<EmailActionForm mode="reset" token={typeof token === "string" ? token : ""} invalidToken={typeof error === "string"}
|
||||
nextPath={safeAuthReturnPath(next)} oidcEnabled={oidcEnabled} oidcOnly={oidcOnly} />
|
||||
nextPath={safeAuthReturnPath(next)} />
|
||||
</main></div>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user