Skip to content

Return UserSession type in getUserSession #358

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

Open
ImBoop opened this issue Feb 18, 2025 · 4 comments
Open

Return UserSession type in getUserSession #358

ImBoop opened this issue Feb 18, 2025 · 4 comments

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.

@Tmmcmasters
Copy link
Contributor

getUserSession not returning the type is a big issue that we are experiencing in production applications.

@Tmmcmasters
Copy link
Contributor

Created PR: #379

@Tmmcmasters
Copy link
Contributor

Tmmcmasters commented Apr 16, 2025

@blouflashdb @ImBoop This issue should now be resolved in the most recent update change @atinux

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

3 participants