Cannot use access token from auth0-nextjs with Supabase Auth's Third-Party Auth #1266
Open
2 tasks done
Labels
bug
Something isn't working
Bug report
Describe the bug
I have followed the guide on how to set up Auth0 with the new third-party auth feature, but it doesn't seem to work with the preferred method of using Auth0 with NextJS - auth0-nextjs.
When I use an access token obtained using this library, I get an error
PGRST301 - JWSError (CompactDecodeError Invalid number of parts: Expected 3 parts; got 5)
, likely because the token is encoded.When I try to use the idToken, which I can decode and verify does contain the "role" claim, I get the following nonsensical error:
PGRST106 - The schema must be one of the following:
but no schemas listed.I'm not sure what else to do here. As far as I can understand, there is a difference in tokens supplied by Auth0 between a Single Page application (what your guide seems to be using), and a Regular Web Application (what I'm using, and you should use, with NextJS) which might explain the issue, but afaik the idToken seems to be valid.
What's going on here?
System information
Additional context
See also supabase/cli#2655 and supabase/cli#2654 for more bugs related to this feature. Both have PRs out to fix them, but no reply.
The text was updated successfully, but these errors were encountered: