issueSignInLink returns a sign-in credential for an existing account with no refuse option
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- authentication
Direzione di ricerca
Read packages/auth-provider-email/src/email-provider.ts at issueSignInLink and authenticateWithIdentifier, then find the email provider tests and the README section “Sign-in links for someone else.” Add coverage showing that the default behavior refuses an address with an existing identity without creating a challenge, and document the credential risk if making the README change. Done when the test passes and the warning accurately says the link must go only to that address.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found in the security review of #195 (review comment).
issueSignInLink (email-provider.ts:254) hands the caller a link that redeems through authenticateWithIdentifier, which signs in whichever user already owns the address. So for an address with an account, the returned link is that account's credential, valid for 7 days, and nothing in the API or README says it may only ever reach that address. An app that shows the inviter a "copy invite link" button, logs the link, or puts it in the inviter's outbox gives a signed-in user a session as any account whose email they know.
Confirmed with a throwaway test: issuing for an address whose identity exists and redeeming from a fresh browser returned 200 {"success":true,"user":{"id":"user-existing"}}.
Fix, either or both:
- An option on
issueSignInLink, such asexistingAccount: "refuse" | "signIn", defaulting to refuse, so an invite to someone who already has an account returns an error and the app sends a plain "you've been invited, sign in" email instead. - A warning in the README's "Sign-in links for someone else" section that the link is a credential for the address and must go only to that address, never to the inviter or a log.
Verified when: a test issues a link for an address with an existing identity and, with the default options, gets a refusal with no challenge created.
- 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à 5/5 Più di una settimana Idoneità per principianti 25/100
activescott/auth#202 ·
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