Accounts and Sessions on the wire: sign up, sign in, sign out and refresh behind the guard #378
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#379 Sign-up and sign-in pages: the navigation names the Account, a refresh keeps it signed in
amaurycoudr/chess-project
#382 Seats and Games as an Account: one Seat across devices, Games owned and listed by the Account
amaurycoudr/chess-project
#376 My games: this browser's decided Games, reachable from the navigation
amaurycoudr/chess-project
#377 Export a stored Game as PGN, with the result of a Resignation or an agreed Draw
amaurycoudr/chess-project
Reference
amaurycoudr/chess-project#378
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#364
What to build
A Player can create an Account with an email, a password and a Username, and is signed in as soon as it exists. They can sign in from any browser with their email in any letter case, sign out of this browser only, and stay signed in for 30 days after last use. Each signed-in browser is a Session: one Postgres row and the two cookies ADR 0030 names, rotated on refresh with the 30-second grace. A global guard reads the access cookie. Each procedure declares one of three modes: required, optional (every Room and
gameprocedure, andaccount.me) or none (sign-up, sign-in, refresh). An expired or invalid access token is UNAUTHORIZED in every mode, never an anonymous call. A deleted Account is refused at once.This ticket also writes the Username ADR, adds Username to the glossary and rewords Account. It makes the signing secret required config, and confirms that Chromium keeps
Secureand__Host-cookies on plain-HTTP localhost before anything builds on them.Seam:
loadConfig; the RPC wire (the real app in process on the PGlite database, with a cookie jar per client, a fake clock and a cheap hash cost)Acceptance criteria
auth.signUp,signIn,signOut,refresh,usernameAvailabilityandaccount.meexist in the contract, resource-oriented, with the errors the spec lists (EMAIL_TAKEN,USERNAME_TAKEN,USERNAME_NOT_ALLOWED,INVALID_CREDENTIALS,UNAUTHORIZED);UNAUTHORIZEDjoins the refusal status table as 401_,-) and the server-side reserved and blocked lists, each refusal tested; email and Username are unique ignoring case, tested with the other letter case; the availability read answers free, taken or not allowedINVALID_CREDENTIALS, with a dummy hash compared for the unknown emailloadConfigrequires the signing secret, tested beside the existing config tests; dev, CI, previews and production provide it, so every stack still bootsauth/folder is declared in the API's layer order and framework-import rules (the owner ruled on the accounts breakdown that declaring a folder the spec creates counts as the requested lint change; nothing else in lint config changes)main, so production still bootsmentioned in issue #379
mentioned in issue #382
mentioned in issue #364
mentioned in issue #376
mentioned in issue #377
marked this issue as related to #364
marked this issue as related to #376
marked this issue as related to #377
marked this issue as related to #382
marked this issue as related to #379
mentioned in commit
32b51615a2mentioned in commit
045e0c70f1mentioned in commit
71fdd96928mentioned in commit
a6157e1eeementioned in commit
0634afd438mentioned in merge request !523
mentioned in commit
6b480f21bementioned in commit
938a5409c7mentioned in commit
f06de8b474mentioned in commit
402c03186bmentioned in commit
081eca8464