Skip to content

Commit

Permalink
refactor: move KindeContext event declaration (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
mod08 authored Feb 9, 2025
1 parent fb23f5b commit 247f5cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { CookieSerializeOptions } from 'cookie-es'
import { join } from 'pathe'

import { version } from '../package.json'
import type { KindeContext } from './runtime/types'

// Module options TypeScript interface definition
export interface ModuleOptions {
Expand Down Expand Up @@ -173,3 +174,9 @@ export default defineNuxtModule<ModuleOptions>({
})
},
})

declare module 'h3' {
interface H3EventContext {
kinde: KindeContext
}
}
6 changes: 0 additions & 6 deletions src/runtime/server/middleware/kinde.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,3 @@ async function createSessionManager(event: H3Event): Promise<SessionManager> {
},
}
}

declare module 'h3' {
interface H3EventContext {
kinde: KindeContext
}
}

0 comments on commit 247f5cb

Please sign in to comment.