7
Lack of interoperability between `custom_access_token_hook` and `.getUser()`
Source: supabase/supabase#26543 · opened by @geoffreygarrett
The new ssr package has made it clear, as indicated by the warnings:
The custom claims we set via custom_access_token_hook are not propagated to the user whatsoever, even through app_metadata set via custom_access_token_hook. In this case how should we rely on permissions defined in the access_token if I can only retrieve it from .getSession()?
Either I'm missing something, or there's no clear established secure method to do what I want to do in SSR & middleware with a user's JWT.
I have tried to resolve this locally, so I apologise if I'm overlooking something. I appreciate any input on whether this warrants a feature request or if this is a case of PEBKAC.
The custom claims we set via custom_access_token_hook are not propagated to the user whatsoever, even through app_metadata set via custom_access_token_hook. In this case how should we rely on permissions defined in the access_token if I can only retrieve it from .getSession()?
Either I'm missing something, or there's no clear established secure method to do what I want to do in SSR & middleware with a user's JWT.
I have tried to resolve this locally, so I apologise if I'm overlooking something. I appreciate any input on whether this warrants a feature request or if this is a case of PEBKAC.
No pledges yet. Be the first to back this.
Comments
Similar requests
Add autoRefresh Option to getUser() to Ensure Session Data is Synced with Latest User State
3 votes · 0 comments
Changing JWTs to RS256 to verify JWT inside getSession() anywhere
4 votes · 0 comments
Support for Retrieving Multiple Users by IDs in supabase-js
5 votes · 0 comments
OpenID configuration
1 vote · 0 comments
Event-Driven Message Queue akin to GCP Pub/Sub for Distributed Systems
10 votes · 0 comments
No comments yet.