joy add auth table <table>joy add auth routes <table>
the routes command creates two route files, sessions.janet and <table>.janet along with common functions for auth and it updates your routes file with defroutes private
<table> will be the name of the table responsible for authenticating people (accounts, users, whatever)
when you (import auth) you have access to the default auth middleware (auth) which should prevent users from accessing anything without [:session :<table> :id]
joy add auth table <table>
joy add auth routes <table>
the routes command creates two route files, sessions.janet and
<table>.janet
along with common functions for auth and it updates your routes file with defroutes private<table>
will be the name of the table responsible for authenticating people (accounts, users, whatever)when you
(import auth)
you have access to the default auth middleware(auth)
which should prevent users from accessing anything without[:session :<table> :id]
[ ] Generate table
<table>
with fieldsemail
,last-sign-in-at
,code
,code-created-at
[ ] Send magic link email
[ ] Generate a middleware file for checking authentication
~- [ ] Generate table
<table>
with fieldsemail
,password
,last-sign-in-at
,reset-password-token
,reset-password-token-expires-at
~ ~- [ ] Generate session and<table>
routes with sign up/in/out + forgot/reset password functions~ ~- [ ] Generate a reset password "mailer" file~ ~- [ ] Generate a middleware file for checking authentication~ ~- [ ] Send reset password emails~ ~- [ ] Two factor auth~