Auth Hook and Edge Function not working #38579
Replies: 4 comments 2 replies
-
|
I think that error means you are not providing the hook call with the secret. |
Beta Was this translation helpful? Give feedback.
-
|
I'm also getting the same error. Somehow, the auth hook invokes my edge function's http smoothly, only when I disabled the "Verify JWT with legacy secret" (you can try this). But when enabled, I get the same authorization error. That's just a test I conducted. The real thing I was trying to achieve was to link my app's api route (http) to the hook instead of the edge function's http. Because that's where the full logic lies. I'm still on the same boat. No solution yet. From my observations, I can deduce that supabase auth hook does not an authorization header during the HTTP invocation. It's just an hypothesis, seeing that the feature is still a BETA. |
Beta Was this translation helpful? Give feedback.
-
|
I was receiving the Hope this can help someone 🚀 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I made an Before-User-Created-Hook that post to my edge function.
When i sign up an account in my app, I got a warning:
Hook requires authorization token,and in the inspector, i just got this:
LoginPage.tsx:69
POST https://*******.supabase.co/auth/v1/signup?redirect_to=http%3A%2F%2Flocalhost%3A3001%2Fauth%2Fcallback 500 (Internal Server Error)
await in signUp
handleEmailAuth @ LoginPage.tsx:69
I checked the invocations tab in the edge function, and there was a record created of when I clicked sign-up. But there is nothing in the log, although I added several loggin at the beginning of the function.
I also tried to use curl command to trigger the function with ANNO KEY and the HOOK SECRET created with the hook. I could successfully trigger it.
So I don't know where do I look at.
Beta Was this translation helpful? Give feedback.
All reactions