Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
export function vtTokenSessionAuth(handler) {
return async function(req: Request) {
const { passwordAuth } = await import("https://esm.town/v/stevekrouse/vtTokenSessionAuth");
const { verifyToken } = await import("https://esm.town/v/pomdtr/verifyToken?v=1");
return passwordAuth(handler, { verifyPassword: verifyToken })(req);
};
}
September 11, 2024