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 auth: 'user' shouldn't the fetch handler return 401 on no user/JWT? How can userClaims be nullable?
exportdefault{fetch: withSupabase({auth: 'user'},async(_req,ctx)=>{// Need to manually check if userClaims is actually present even though we use auth: 'user'if(!ctx.userClaims){// userClaims is UserClaims | nullreturnunauthorized("Missing userClaims for authenticated request")}constuserId=ctx.userClaims.id}),}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When using
auth: 'user'shouldn't thefetchhandler return 401 on no user/JWT? How canuserClaimsbe nullable?This would be ideal:
Beta Was this translation helpful? Give feedback.
All reactions