Created
September 3, 2024 17:22
-
-
Save RomainLanz/3e685afa761c25cac0a0cb1f36b26d85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { HttpContext } from '@adonisjs/core/http' | |
import type { NextFn } from '@adonisjs/core/types/http' | |
export default class SilentAuthMiddleware { | |
async handle(ctx: HttpContext, next: NextFn) { | |
await ctx.auth.check() | |
return await next() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment