auth
No description in the catalogue.
Chunks · not packaged yet · by @dan
I haven't packaged this one yet. It's on the shelf so you can see it coming, not so you can take it.
Yours to decide
These land as a config file in your app. Change a line and the chunk changes — no forking, no flags passed to somebody else's runtime.
- usernamesAsk for a unique username on first sign-in, and gate the app until one is chosenfalse
- magicLinkPut a one-click link in the email beside the codetrue
- codeLengthHow many digits the emailed code has6
- codeMinutesHow long a code stays good for10
- maxAttemptsWrong guesses before a code is spent5
- codesPerHourHow many codes one address may ask for in an hour5
- openSignupLet anyone sign up, rather than requiring an invitation firstfalse
- fromThe envelope sender on every email this chunk sendsYour App <hello@example.com>
- subjectSubject line of the sign-in emailYour sign-in code
- greetingThe line above the codeHere's your code.
- signoffThe line below the codeIf you didn't ask for this, ignore it.