Files
t5de-hub/apps/web/app/signup/page.tsx
T
dhkatz 23cae691a9
Pull request / title (pull_request) Successful in 1s
CI / test (pull_request) Successful in 1m28s
CI / image (apps/api/Dockerfile, t5de-hub-api) (pull_request) Skipped
CI / image (apps/web/Dockerfile, t5de-hub-web) (pull_request) Skipped
feat(accounts): locked registration, for staging
A third registration setting, locked: every new account waits for a
moderator's approval, Discord sign-ins too, and only approved accounts sign
in to T5DE's other sites. Today staging's closed registration still lets any
Discord account in as a basic account, straight into Music's staging (and
soon payments' staging, with PayPal's sandbox).

The gate is the OAuth provider's postLogin check: an unapproved account is
sent to the website's waiting page and no code is issued, on every authorize
request and /oauth2/continue. Open and closed behave as before, so prod's
Music sign-ins don't change.
2026-11-20 12:29:19 -08:00

22 lines
760 B
TypeScript

import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { NarrowCard } from "@/components/narrow-card";
import { api, getMe, unwrap } from "@/lib/api";
import { SignUpForm } from "./signup-form";
export const metadata: Metadata = { title: "Create account" };
export default async function SignUp() {
if (await getMe()) redirect("/account");
const { registration } = unwrap(await api.hub.get());
const description =
registration !== "open"
? "One T5DE account for all your IMVU accounts. New accounts need a moderator's approval."
: "One T5DE account for all your IMVU accounts.";
return (
<NarrowCard title="Create account" description={description}>
<SignUpForm />
</NarrowCard>
);
}