Discord sign-in and basic accounts
Discord sign-in makes a basic account (Discord's verified email, no username or password) for T5DE's other sites; it finishes setting up with a username and password to use the hub. Implicit linking by email is off; members link Discord from their account page. Better Auth 1.7.26.
This commit is contained in:
1 parent
a66a3a4b6a
commit
f0a9661f8e
24 files changed
+5214
-173
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"use client";
|
||||
// A basic account (made by signing in with Discord) chooses a username and password, and becomes a member.
|
||||
import { ActionForm, SubmitButton } from "@/components/forms";
|
||||
import { Field, FieldDescription, FieldGroup, FieldLabel } from "@/components/ui/field";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { finishSetup } from "./actions";
|
||||
|
||||
export function FinishSetupForm() {
|
||||
return (
|
||||
<ActionForm action={finishSetup}>
|
||||
<FieldGroup>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="username">Username</FieldLabel>
|
||||
<Input id="username" name="username" autoComplete="username" required minLength={3} maxLength={32} pattern="[A-Za-z0-9_]+" autoFocus />
|
||||
<FieldDescription>Letters, digits and underscores. Other T5DE members see it.</FieldDescription>
|
||||
</Field>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="password">Password</FieldLabel>
|
||||
<Input id="password" name="password" type="password" autoComplete="new-password" required minLength={10} maxLength={256} />
|
||||
</Field>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="password2">Password again</FieldLabel>
|
||||
<Input id="password2" name="password2" type="password" autoComplete="new-password" required minLength={10} maxLength={256} />
|
||||
</Field>
|
||||
<Field>
|
||||
<SubmitButton pendingLabel="Setting up…">Finish setting up</SubmitButton>
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
</ActionForm>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user