Skip to content

bug: Nuxt; Typescript types not properly resolved on server #917

Open
@sruusk

Description

@sruusk

Describe the bug

Types for event.context.logtoUser are not fully available in Nuxt server; thus, type checking doesn't work properly.

Expected behavior

N/A

How to reproduce?

N/A

Context

N/A

Fix

This can be fixed by extending the H3EventContext:

declare module 'h3' {
  interface H3EventContext {
    logtoUser: UserInfoResponse | IdTokenClaims | undefined;
  }
}

Sorry if this issue is a bit lacking. :)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions