pomdtr avatar
pomdtr
password_auth
Script
Password Auth Middleware Protect your vals behind a password. Use session cookies to persist authentication. Usage import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=84"; export default passwordAuth(() => { return new Response("OK"); }, { verifyPassword: (password) => password == Deno.env.get("VAL_PASSWORD") }); If you want to use an api token to authenticate: import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=84"; import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken"; export default passwordAuth(() => { return new Response("OK"); }, { verifyPassword: verifyToken }); TODO [x] allow to authenticate using a val town token [ ] add a way to send an email to ask a password from the val owner [ ] automatically extend the session [ ] automatically remove expired sessions FAQ How to sign out ? Navigate to <your-site>/signout .
15
nbbaier avatar
nbbaier
modifyIframeResponse
Script
Forked from andreterron/codeOnValTown
0
pomdtr avatar
pomdtr
devtools
Script
Devtools shortcuts Add useful shortcuts to a val website. Usage /_edit -> go to the val editor /_raw -> view val source /_logs -> view val logs Example import { devtools } from "https://esm.town/v/pomdtr/devtools"; export default devtools((_req: Request) => { return new Response("hello world"); });
4
stevekrouse avatar
stevekrouse
vtTokenSessionAuth
Script
Forked from pomdtr/password_auth
0
stevekrouse avatar
stevekrouse
password_auth
Script
Forked from pomdtr/password_auth
1
mrdrone avatar
mrdrone
password_auth
Script
Forked from pomdtr/password_auth
0
kamek avatar
kamek
password_auth
Script
Forked from pomdtr/password_auth
0
vandermaasc avatar
vandermaasc
password_auth
Script
Forked from pomdtr/password_auth
0
nicosql avatar
nicosql
codeOnValTown
Script
Forked from andreterron/codeOnValTown
0
willthereader avatar
willthereader
codeOnValTown
Script
Forked from andreterron/codeOnValTown
0
MichaelNollox avatar
MichaelNollox
outsideBlushShrimp
Script
Forked from andreterron/codeOnValTown
0
sboesen avatar
sboesen
password_auth
Script
Forked from pomdtr/password_auth
0
Serizon avatar
Serizon
codeOnValTown
Script
Forked from andreterron/codeOnValTown
0
willthereader avatar
willthereader
coralPuma
Script
Forked from andreterron/codeOnValTown
0
nicosql avatar
nicosql
ablePinkDog
Script
Forked from pomdtr/password_auth
0
stevekrouse avatar
stevekrouse
codeOnValTown
Script
Forked from andreterron/codeOnValTown
0
Updated: February 26, 2024