Create Users with custom claims #433
Unanswered
Nikola-Milovic
asked this question in
Q&A
Replies: 1 comment
-
Thanks for the detailed question. Have you set your custom token changed handler in the config property? If so, you have control over when the client calls the login API endpoint. You could wait for some other event to complete first, like the claims getting set, or retry when the login fails. When custom claims change, they won't immediately appear in the ID token. You have to force a token refresh with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, I have the following flow that I cannot get to work properly
User creates an account on the website
A firebase account gets created
The UID from the firebase account gets sent to my server to create the actual account object
Server creates the object and sets custom claims
The issue is between steps 2 and 3, the
/api/login
is called, before the custom claims can be set in the server. I only allow admin accounts to access the website, meaning that the login has to be called after the claims are created, eg the claims have to be set prior, but that doesn't seem possible.And my API route
Beta Was this translation helpful? Give feedback.
All reactions