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.
This commit is contained in:
1 parent
02e8269d4d
commit
23cae691a9
11 files changed
+111
-22
No files matched your search
@@ -24,7 +24,13 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
||||
<StagingBanner />
|
||||
<Header />
|
||||
<main className="mx-auto w-full max-w-5xl flex-1 px-4 py-10 sm:px-6 sm:py-14">
|
||||
{me?.kind === "basic" ? (
|
||||
{me?.kind === "basic" && !me.approved ? (
|
||||
// Only while registration is locked (staging): Discord sign-ins wait for approval too.
|
||||
<NarrowCard
|
||||
title="Waiting for Approval"
|
||||
description={`You're signed in with Discord as ${me.username}. A moderator will approve your account soon; until then you can't use the hub or T5DE's other sites.`}
|
||||
/>
|
||||
) : me?.kind === "basic" ? (
|
||||
<NarrowCard
|
||||
title="Finish Setting Up Your Account"
|
||||
description={`You're signed in with Discord as ${me.username}. Choose a username and password to use the hub; T5DE's other sites already work with your Discord sign-in.`}
|
||||
|
||||
Reference in new issue
Block a user