Custom Claims in Supabase don't show in your Auth panel, but are infact included in your JWT token

Just putting this here in case anyone runs into the same issue with custom claims. :melting_face:

I spent the whole day trying to figure out what was wrong with my configuration only to realize that using custom claims and inserting data through custom claims doesn’t make the data appear within the authentication module.

Although it’s confusing because if you hard code the values inside of places like the app metadata those values will in fact show however if they’re not hard coded and you’re using custom claims they will not show and you have to decode the JWT in order for them to be usable and to show properly

Hmm, Supabase kinda suggests to decode the JWT, so it might not be a WeWeb thing, but rather a Supabase thing. Custom Claims & Role-based Access Control (RBAC) | Supabase Docs

1 Like

Hmmmm I see, I was under the impression that WeWeb was decoding the JWT to show the info, I didn’t know it was a separate response they were getting

It’s a Supabase auth response, in other words, Supabase SDK gives you all this. You can hook with some JS into the event as shown in the link above and edit a variable with the decoded JWT.