activescott / activescott/auth

Make example save identities and users to a simple file to preserve users and identities between restarts.

Aperta Adatta ai principianti
#54 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
0
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

> this example keeps users, identities, and passkey credentials in memory, so restarting the server forgets them all. A passkey saved in your password manager survives the restart, but the server no longer recognizes it (“Unknown credential”) — delete it there and add a new one. A real app would back the stores with a database.
We should just remove this issue from the example. Saving the users as a simple YAML file in the example somewhere would be perfectly fine and make it more robust.

This wasn't really an issue with emails and SMS, but with passkeys it's pretty damning.

Use simple text files, not SQLite or something, just to keep the example as simple as possible.

We can encapsulate the datastore into a separate module file to keep it separate from the rest of the example.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Look for the in-memory stores for users and identities in the example code. Create a new module file (e.g., `file-store.ts`) that reads from and writes to a YAML file. Integrate this module to replace the current volatile storage. Test by restarting the server and verifying that a previously registered passkey is still recognized.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, yaml
Ambito
backend, databases
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
70/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.