Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Added new layout and page components for forgot password and signup functionalities, enhancing user experience. - Integrated authentication flow handling for password recovery and account creation, utilizing dynamic metadata. - Updated login form to include links for forgot password and signup, improving navigation between authentication states. - Refactored CSS styles for login components to ensure consistent design across different authentication pages.
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import Link from "next/link"
|
|
import { AuthFlowPage } from "@/components/auth/auth-flow-page"
|
|
import { AUTH_FLOW_SLUGS } from "@/lib/auth/auth-flow-slugs"
|
|
|
|
type SignupPageContentProps = {
|
|
returnTo?: string
|
|
}
|
|
|
|
export function SignupPageContent({ returnTo = "/mail/inbox" }: SignupPageContentProps) {
|
|
const loginHref = `/login?returnTo=${encodeURIComponent(returnTo)}`
|
|
const oidcHref = `/api/auth/login?returnTo=${encodeURIComponent(returnTo)}`
|
|
|
|
return (
|
|
<AuthFlowPage
|
|
slug={AUTH_FLOW_SLUGS.enrollment}
|
|
defaultTitle="Créer un compte"
|
|
defaultDescription="Choisissez votre identifiant @ultisuite.fr et configurez votre profil."
|
|
successTitle="Compte créé"
|
|
successDescription="Votre compte UltiSpace est prêt. Connectez-vous pour accéder à la suite."
|
|
successActionLabel="Se connecter"
|
|
successHref={oidcHref}
|
|
successExternal
|
|
footer={
|
|
<p className="w-full text-center text-sm text-muted-foreground">
|
|
Déjà un compte ?{" "}
|
|
<Link className="font-medium text-primary underline" href={loginHref}>
|
|
Se connecter
|
|
</Link>
|
|
</p>
|
|
}
|
|
/>
|
|
)
|
|
}
|