Gate point before a verify creates a user
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- authentication
Direzione di ricerca
Start in the verify flow around authenticateWithIdentifier, following the calls to userStore.create and identityStore.create, then read InitiateGate.onVerified and checkVerifiedGate. Decide between the onBeforeCreateUser hook and an onInitiate silentRefuse decision before writing anything. Done means the gate is consulted before any user or identity row is written, a refused correct code returns the same error as a wrong one without clearing the auth_challenge cookie, and isNewUser is documented.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
InitiateGate.onVerified runs after authenticateWithIdentifier has already called userStore.create and identityStore.create. An app that answers every initiate the same way, so its form doesn't reveal who has an account, still gets a live code stored for an address it won't serve. If someone guesses that code, the account is created before the gate is asked. To refuse it, the app has to delete rows the library just wrote. Two verifies of the same code can also both get past the challenge and reach that sequence together, so the app can't use "I inserted this row" to mean "this account is new". It needs its own approval mark.
Ask, either of:
- A hook such as
gate.onBeforeCreateUser({ provider, identifier, request }), called inauthenticateWithIdentifierbeforeuserStore.create. Its{ error }fails the verify like a bad code. - An
onInitiatedecision such as"silentRefuse": no challenge is stored and no email is sent, but the answer is the same as for an accepted initiate (status, redirect, and a challenge cookie of the same shape).
Also: when onVerified answers { error }, send that error without the provider's cookie that clears auth_challenge (checkVerifiedGate adds it today). If the cookie is cleared, a refused correct code doesn't answer like a wrong one: the next post from that browser gets "Verification not found" instead of "Incorrect code", which shows the guess was right and the address isn't served.
Also worth documenting: isNewUser means "no identity existed", not "the user row is new", which matters for a user store that upserts.
Found while building invites in activescott/four-in-a-row (security reviews on activescott/four-in-a-row#42). That app works around this today with an approved_at column that only onVerified sets.
Milestone: Private Beta, because an invite-only app is exactly the case this affects.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 2
- Merge medio
- 11g 7h
- PR unite (30g)
- 10
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di activescott/auth
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
activescott/auth#193 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
activescott/auth#54 ·
I maintainer di solito rispondono entro 1 giorno
-
consolidate tsconfigsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
activescott/auth#38 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
activescott/auth#211 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
activescott/auth#197 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di activescott/auth
Issue simili
-
accessibility area:ci ci-test level:low priority:high type:test
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
skytuhua-org/Gen-V1#3132 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
drmrd/vernacular#1238 ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
enhancement migration-prioritized
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Hudson-Pufferfish/local-party-console#136 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno