Deno Alosaur JTW Authentication


Deno 1.6

version: "3.2"services:
container_name: redis
image: redis
restart: always
- "6379:6379"
const app = new App({areas: [AuthenticationArea],logging: false,});const sessionStore = new RedisSession('', 6379);await sessionStore.init();const authMiddleware = new AuthMiddleware( [JWTSchema],);const sessionMiddleware = new SessionMiddleware(sessionStore,{ secret: 1122n, maxAge: DAYS_30, path: "/" },);app.use(new RegExp("/"), sessionMiddleware);app.use(new RegExp("/"), authMiddleware);app.useSecurityContext();app.listen();



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store