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
updateValByName
Script
Forked from nbbaier/createVal
0
janpaul123 avatar
janpaul123
getValsContextWindow
Script
An interactive, runnable TypeScript val by janpaul123
0
pomdtr avatar
pomdtr
verifyToken
Script
An interactive, runnable TypeScript val by pomdtr
0
1
Next
janpaul123-valtownchatgpt2.web.val.run
Updated: July 15, 2024