Something went wrong. Try again.
Something went wrong. Try again.
1.0 kB · 37 lines
TypeScript
at main
1234567891011121314151617181920212223242526272829303132333435363738import { defineConfig } from '@adonisjs/auth'import { sessionGuard } from '@adonisjs/auth/session'import type { InferAuthenticators, InferAuthEvents, Authenticators } from '@adonisjs/auth/types'import { atprotoUserProvider } from '@thisismissem/adonisjs-atproto-oauth/auth/provider'
const authConfig = defineConfig({ /** * Default guard used when no guard is explicitly specified. */ default: 'web',
guards: { /** * Session-based guard for browser authentication. */ web: sessionGuard({ /** * Enable persistent login using remember-me tokens. */ useRememberMeTokens: false, provider: atprotoUserProvider, }), },})
export default authConfig
/** * Inferring types from the configured auth * guards. */declare module '@adonisjs/auth/types' { export interface Authenticators extends InferAuthenticators<typeof authConfig> {}}declare module '@adonisjs/core/types' { interface EventsList extends InferAuthEvents<Authenticators> {}}