Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return UserSession type in getUserSession #358

Open
ImBoop opened this issue Feb 18, 2025 · 1 comment
Open

Return UserSession type in getUserSession #358

ImBoop opened this issue Feb 18, 2025 · 1 comment

Comments

@ImBoop
Copy link

ImBoop commented Feb 18, 2025

Since you aren't defining a return type, TypeScript has to do a best-effort to determine it. However, this is causing it to bypass custom session types.

To fix, I suggest having this line updated to return UserSession. If needed, I can make a PR, but it may be some time before I'll have availability.

Line is here

@blouflashdb
Copy link

Yeah I now also get type errors.

I extend the UserSession type

interface UserSession {
challenge: string
}

but since getUserSession is not returning the type anymore I get type errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants