nuxt-auth-utils icon indicating copy to clipboard operation
nuxt-auth-utils copied to clipboard

Return UserSession type in getUserSession

Open ImBoop opened this issue 9 months ago • 4 comments

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

ImBoop avatar Feb 18 '25 17:02 ImBoop

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.

blouflashdb avatar Feb 25 '25 20:02 blouflashdb

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

Tmmcmasters avatar Mar 20 '25 12:03 Tmmcmasters

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

Tmmcmasters avatar Apr 16 '25 13:04 Tmmcmasters

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

Thanks!

Fixed in #379

ImBoop avatar May 12 '25 21:05 ImBoop