Set custom claim in post registration

We have a custom action in our post login flow where we set custom claims. This works smooth, but now we want to allow users to sign-up via the Auth0 Universal Login. Because the login isn’t triggered after the sign-up, the custom claims haven’t been configured after user registration.

We tried to setup custom claims in the Post User Registration flow but there we don’t have access to the accessToken.

What would be the best approach in this case to have a custom claim setup in the Post User Registration?

Thanks in advance for your help!
Jan

Hey there @jan.pannecoeck , welcome!

I’m on a stage of checking the behaviour in case of sign up and setting custom claim in the access token. My post login action where I set a custom claim for the access token is triggered also in case of signing up. My set up is that I use login with redirect → Universal Login Page → Sign up-> create a test user → and the user is redirected back to an app with an access token enriched with the custom claim.

What’s your set up? I’m thinking if you need the post user registration action for this purpose at all.
Please let me know your thoughts!

After some further investigation and testing, I noticed that indeed my Login flow and Post Login action was indeed also triggered properly after a User Registration. But due to the code in that Post Login action some things weren’t setup properly… The problem is within the code, not the flow.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.