Forcing JWT refresh after setting custom claims
Hey folks! I'm using https://github.com/supabase-community/supabase-custom-claims to set custom claims in my JWT for integration with another service (Hasura). I have a database trigger that sets the claim whenever a new user is inserted. This works fine, but when creating an account using
supabase.auth.signUp, I get the session data with an initial JWT back immediately, before the trigger runs. Is there any way to force a refresh of the JWT so that I get a version with the new claim in it? Right now, I'm only able to get it working by logging out and logging back in again. I've tried a few combinations of setSession, updateUser, etc, but I only ever get the initial JWT back.GitHub
How to implement custom claims with Supabase. Contribute to supabase-community/supabase-custom-claims development by creating an account on GitHub.