Clerk & Supabase Third Party Integration: Edge Functions Authentication Issue #34988
-
|
The Issue
From what I understand, edge functions do not correctly make use of the Third-Party Auth integration with Clerk. Specifically the RS256 provided from Clerk fails to validate because Supabase does not verify with the Clerk application JWKS endpoint in the edge function. Question If this is a current limitation how would I go about properly instantiating a |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 9 replies
-
|
You have to provide a valid JWT signed by the Supabase JWT secret. I thought even the new 3rd party Auth with Clerk generated a valid JWT for use. But there was just a storage issue with Clerk generated tokens dealing with format... #34948 . |
Beta Was this translation helpful? Give feedback.
-
|
i am having the same problem here, i don't understand if this is something wanted from supabase or a bug so i can create the bug basically ? |
Beta Was this translation helpful? Give feedback.
-
|
Same here, getting a string of user authentications issues. Would appreciate a clearer guide on integrating Clerk and Supabase. |
Beta Was this translation helpful? Give feedback.
-
|
@capeflow @GaryAustin1 |
Beta Was this translation helpful? Give feedback.
-
|
Same issue here as well, any work around except the --no-verify-jwt flag? |
Beta Was this translation helpful? Give feedback.
-
|
Same issue here. I've reduced it to this. The token is definitely valid. I have no issues authenticating and accessing the database with RLS. |
Beta Was this translation helpful? Give feedback.
-
|
Same issue here. I had to create |
Beta Was this translation helpful? Give feedback.
-
|
I took a slightly different approach here. I am serving the function with the Not sure if this is right but it does allow me to execute a POST request despite having the flag set. |
Beta Was this translation helpful? Give feedback.
-
|
Same issue here. |
Beta Was this translation helpful? Give feedback.
-
|
Followgng, exact same issue |
Beta Was this translation helpful? Give feedback.
-
|
Hey everyone 💚 After internal discussing we decided the best approach is to disable legacy JWT verification, since legacy keys will be deprecated soon! For users that would like to apply JWT verification or Integrate with a custom provider we prepared a custom-jwt-validation example, with both "supabase default" and "clerk" templates. ref: #40438 |
Beta Was this translation helpful? Give feedback.
Hey everyone 💚
First of all I do really sorry for the delay at this response 😕
After internal discussing we decided the best approach is to disable legacy JWT verification, since legacy keys will be deprecated soon!
At this moment the recommended approach is to
--no-verify-jwtwhile developing locally.For users that would like to apply JWT verification or Integrate with a custom provider we prepared a custom-jwt-validation example, with both "supabase default" and "clerk" templates.
You can use these ones a starting point for your own jwt validator, we would also appreciate any help with more template examples 💚
ref: #40438