Verifying Supabase JWT Myself - Bad Practice? #20763
Unanswered
angus-clark
asked this question in
Questions
Replies: 4 comments 9 replies
|
It is a common thing to do for API's. Almost any jwt library using the secret will decode and verify the jwt. |
0 replies
If you decode the token at jwt.io, the header says the also is HS256. What made you say HMAC256? |
6 replies
|
I had the same problem - for me the issue was that I had to verify audience when validating. pyjwt didn't give me a very helpful error but python-jose did. I plugged my JWT I got from supabase into https://jwt.io/ and found:
Here is an example in python using pyjwt If you also want/need to verify Authority I wrote about it here https://github.com/orgs/supabase/discussions/4762#discussioncomment-9502775 but that wasn't the case for me |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am creating a backend server with micronaut and would like to use the existing supabase auth for my api endpoints. The only way I can think of securing my end points is verifying the supabase access token myself using the JWT_secret.
This requires me to know the algorithm used by supabase (HMAC256) which seems like a possible point of failure. Is this correct?
Is there any other way I can't see to authorize my endpoints in micronaut using supabase?
All reactions