Closed echarrod closed 2 months ago
I can see missing sub claim is being thrown from here: https://github.com/supabase/auth/blob/9d419b400f0637b10e5c235b8fd5bac0d69352bd/internal/api/auth.go#L106
I saw these related issues which are getting the signing method RS256
error:
And also looks like this one had a similar issue for Swift (https://github.com/supabase-community/gotrue-swift/issues/4), and SigninWithIDToken was added, is that what I need to have a bearer token work? 🤔
I can successfully do:
curl "https://my.supabase.co/rest/v1/auth/users" -H "apikey: myServiceAPIKey"
without getting a api key error, which makes me think it could be the auth mechanism? 🤔
Pasting the JWT into https://jwt.io/ I can see it does output:
{
"alg": "HS256",
"typ": "JWT"
}
..but it also does say invalid signature at the bottom
I think I'll close this. It seems neither of the tokens from the supabase dashboard are meant to be used here. I instead used a token from a regular user (not admin token), and it worked
Bug report
Describe the bug
When I try to get a user using a token I get a couple of different errors.
To Reproduce
my code:
Expected behaviour
System information
Additional context
I know I have two keys on my admin dashboard:
As I understand it, my server has service_role configured when setting up the client with
supabase.NewClient
, and then I can make calls from the browser/FE with the public oneI tried mixing and matching these, to be sure, but get the following error, I believe when using the anon token (which I think makes sense?):
But then I also get this one:
I'm not really sure how my jwt would be RS256, I'm copying it from the supabase dashboard.