activescott / activescott/auth

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

未關閉 適合新手
#54 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
0
分支
1
PR 合併指標
30 天內沒有已合併 PR

描述

> 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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

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.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
typescript, yaml
領域
backend, databases
Issue 類型
功能
難度
2/5
預估耗時
1-3 小時
活躍度
冷清
描述清晰度
描述清楚
新手友好度
70/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。