Accounts 1.1.0: moving Events' users in, people.* requests, new recovery codes
POST /api/accounts/v1/requests (crosscode.identity-request/1): import.* keeps each person's Events id as sub, password hash and authenticator secret (sealed in transit), consent, notices and lockout; linked when the email already has an account. people.* for product admins, limited to people the product knows. New recovery codes after the first 2FA sign-in for people moved in with 2FA. screen=signup. auth-client: request(), seal(), signUp. 8 new tests (47 in all). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,11 +17,12 @@ export function Reset({ token }: { token: string | null }) {
|
||||
<form onSubmit={async (e) => {
|
||||
e.preventDefault();
|
||||
setBusy(true);
|
||||
const r = await call<{ uid: string | null }>("POST", "/password/reset", { token, password: new FormData(e.currentTarget).get("password") });
|
||||
const r = await call<{ uid: string | null; returnUrl: string | null }>("POST", "/password/reset", { token, password: new FormData(e.currentTarget).get("password") });
|
||||
setBusy(false);
|
||||
if (!r.ok) return setError(r.error.message);
|
||||
// Back to the sign-in it started from (and on to that site), or to the account page.
|
||||
window.location.assign(r.data.uid ? `/signin?uid=${encodeURIComponent(r.data.uid)}` : selfSignIn("/account"));
|
||||
// Back to the sign-in it started from (and on to that site), to the product that made the
|
||||
// account (its sign-in brings them straight back here signed in), or to the account page.
|
||||
window.location.assign(r.data.uid ? `/signin?uid=${encodeURIComponent(r.data.uid)}` : r.data.returnUrl ?? selfSignIn("/account"));
|
||||
}}>
|
||||
<Field label="New password" name="password" type="password" autoComplete="new-password" required minLength={8} autoFocus />
|
||||
<Button type="submit" busy={busy} className="w-full">Save and sign in</Button>
|
||||
|
||||
Reference in New Issue
Block a user