Admins and supervisors without 2FA are sent a code at their next login, and verifying it turns 2FA on. They can change the channel but not turn it off. Older sessions without 2FA are rejected with TWO_FACTOR_REQUIRED, and promoting a user ends their sessions so they enrol at next login. The requirement is skipped when no email or WhatsApp channel can deliver a code, and TWO_FACTOR_REQUIRED_ROLES=false switches it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 lines
3.0 KiB
TypeScript
55 lines
3.0 KiB
TypeScript
import React from "react";
|
|
import { LogIn, UserPlus, KeyRound, ShieldCheck } from "lucide-react";
|
|
import { GuideItem } from "@/components/shared/GuideItem";
|
|
import type { HelpContent } from "./types";
|
|
|
|
/** Help content shared by /login, /register, and /forgot-password. */
|
|
export const authHelpContent: HelpContent = {
|
|
title: "Account help",
|
|
subtitle: "Signing in, creating an account, and resetting your password.",
|
|
quickLinks: [
|
|
{ label: "Log in", href: "/login", icon: LogIn },
|
|
{ label: "Create an account", href: "/register", icon: UserPlus },
|
|
{ label: "Forgot password", href: "/forgot-password", icon: KeyRound },
|
|
],
|
|
tabs: [
|
|
{
|
|
key: "account",
|
|
label: "Signing in & registering",
|
|
icon: LogIn,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<p>You can log in with either your email address or phone number, whichever you registered with.</p>
|
|
<div className="space-y-4">
|
|
<GuideItem icon={UserPlus} title="Don't have an account yet?" tone="brand">
|
|
You don't always need one — some events let you register as a guest with just your name and email. If an event requires an account, you'll be prompted to create one right from the registration form.
|
|
</GuideItem>
|
|
<GuideItem icon={LogIn} title="Already registered as a guest?" tone="green">
|
|
If you registered as a guest before, you can still create a full account later using the same email — your past registrations will be there once you're logged in.
|
|
</GuideItem>
|
|
<GuideItem icon={ShieldCheck} title="Asked for a verification code?" tone="amber">
|
|
If you've turned on two-factor authentication, we send a 6-digit code by email or WhatsApp after your password. Enter it within 10 minutes, or use "Resend code" if it doesn't arrive. Tick "Trust this device" to skip the code on that device for 30 days. You can turn two-factor on or off from Profile & Security.
|
|
</GuideItem>
|
|
<GuideItem icon={ShieldCheck} title="Admin or supervisor?" tone="amber">
|
|
Two-factor authentication is required for admin and supervisor accounts. If it isn't on yet, your next login sends you a code, and entering it turns two-factor on. You can change whether codes come by email or WhatsApp from Profile & Security, but you can't turn it off.
|
|
</GuideItem>
|
|
</div>
|
|
</div>
|
|
),
|
|
},
|
|
{
|
|
key: "password",
|
|
label: "Resetting your password",
|
|
icon: KeyRound,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<p>Use "Forgot your password?" on the login page to get a reset link emailed to you — it expires after an hour for security.</p>
|
|
<GuideItem icon={ShieldCheck} title="Already logged in?" tone="amber">
|
|
You can change your password directly from Profile & Security instead, without needing an email link.
|
|
</GuideItem>
|
|
</div>
|
|
),
|
|
},
|
|
],
|
|
};
|