You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using methods like isAuthenticated it doesn't return a User but rather a SerializeFrom<User> e.g. if you try to return a record with a bigint it'll serialize to a string
I'm not sure if this has something to do with how the cookie storage works or if this is a bug in remix-auth but just ran into this issue where the verify function return value was complaining that the type of user had string values but prisma was returning bigint
Your Example Website or App
N/A
Steps to Reproduce the Bug or Issue
typeUser={id: string}functiongetUser(): {id: bigint}{return{id: newBigInt(1)}}exportconstauthenticator=newAuthenticator<User>(sessionStorage);assert(process.env.GOOGLE_CLIENT_ID,'GOOGLE_CLIENT_ID is not set');assert(process.env.GOOGLE_CLIENT_SECRET,'GOOGLE_CLIENT_SECRET is not set');authenticator.use(newGoogleOAuth2Strategy({callbackURL: `/auth/google/callback`,clientID: process.env.GOOGLE_CLIENT_ID,clientSecret: process.env.GOOGLE_CLIENT_SECRET,responseType: 'code',accessType: 'offline',scope:
'openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email',},async({ profile })=>{returngetUser()// this complains because it returns bigints rather than string// but the return value will always be strings during consumption in loaders/actions},),'google',);
Expected behavior
proper type handling
Screenshots or Videos
No response
Platform
OS: MacOS
Browser: Chrome
Version: N/A
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
when using methods like isAuthenticated it doesn't return a
User
but rather aSerializeFrom<User>
e.g. if you try to return a record with a bigint it'll serialize to a stringI'm not sure if this has something to do with how the cookie storage works or if this is a bug in remix-auth but just ran into this issue where the verify function return value was complaining that the type of user had string values but prisma was returning bigint
Your Example Website or App
N/A
Steps to Reproduce the Bug or Issue
Expected behavior
proper type handling
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: