Skip to content

Instantly share code, notes, and snippets.

@RomainLanz
Created September 3, 2024 17:22
Show Gist options
  • Save RomainLanz/3e685afa761c25cac0a0cb1f36b26d85 to your computer and use it in GitHub Desktop.
Save RomainLanz/3e685afa761c25cac0a0cb1f36b26d85 to your computer and use it in GitHub Desktop.
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