-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AuthApiError: Error invoking access token hook with custom claim #1561
Comments
This seems like an error on possibly an auth.users trigger trying to write to a profiles table when you create a new user? |
This would have been a call for help surely, if I wasn't sure that it is related to auth hook, which is in beta. It is surely related to that and yes, before logging this here I got rid of error, getting help from discord. |
Do you have an auth.users trigger function? You can see in the dashboard database triggers section. |
And you are showing signUp which is what will cause that insert trigger to run. |
yeah so, users who are using SSO are also getting those triggers under the hood, I guess, cause SSO doesn't force user to perform sign up action, but it does behind the UI , right. What should I do in that case? FYI there aren't any trigger functions. |
Hey @agrittiwari , Thanks for the query - can I check if you're still facing the issue? Like @GaryAustin1 mentioned it's quite common to see an error from a trigger there. There's an |
Hi @J0 , thanks. Would you please share the relevant doc here for |
Here's the docs for the hook
If it helps we'll be releasing HTTP Hooks soon so it'll be possible to edit claims using JavaScript which might be significantly easier |
Bug report
Describe the bug
So I am simply signing with email and password. I added a custom claim to be added in jwt,
here it is
this ran successfully and it does not resolve when I am hitting the handler from supabase-js from my client and giving this error
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
No idea , what profiles it is referring to:
Log from Supabase console
Expected behavior
Expected behavior is for supabase to return the session with accessToken and refreshToken , accessToken rich with custom claim.
that I am gonna send in API header for following calls.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
I have read this issue extensively and it does n't seem to address the problem I am facing #1523
The text was updated successfully, but these errors were encountered: