# Howto add custom claims during sign-up?

**URL:** <https://community.auth0.com/t/howto-add-custom-claims-during-sign-up/195494>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [December 14, 2025, 4:34pm UTC](https://community.auth0.com/t/howto-add-custom-claims-during-sign-up/195494 "2025-12-14T16:34:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpuidle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cpuidle/32/77774_2.png) [@cpuidle](https://community.auth0.com/u/cpuidle)\
**Post date:** [December 14, 2025, 4:34pm UTC](https://community.auth0.com/t/howto-add-custom-claims-during-sign-up/195494/1 "2025-12-14T16:34:49Z")

</div>

We’re developing an application where users can log into a cloud service to connect to their home device. To do this, users need to provide proof of ownership for their devices.

When signing up with the cloud service we wan’t to register ownership claims with the user’s metadata. We already understand that we can…

- register the ownership metadata using the management api
- extract metadata into custom claims in the user’s access token using a post-login action

What’s unclear is how this can be done right after initial signup. It would be nice- if possible- if we could register the user metadata and force-retrieve a new access token. Alternatively, it would be nice if we could register additional user metadata during signup, i.e. when the user logs in for the first time.

Hope the question makes sense, looking forward to an interesting answer!

Cheers,  
Andi

---

<div class="post-metadata">

**Author:** ![cpuidle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cpuidle/32/77774_2.png) [@cpuidle](https://community.auth0.com/u/cpuidle)\
**Post date:** [December 14, 2025, 4:43pm UTC](https://community.auth0.com/t/howto-add-custom-claims-during-sign-up/195494/2 "2025-12-14T16:43:56Z")

</div>

After researching a bit more it seems that `pre-user-registration`with a machine-to-machine trigger might be a technical approach to enrich the required data before the token is issued, however [Pre-user Registration Trigger](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger) says:

> You cannot currently use **`pre-user-registration`** Actions to add metadata to passwordless users.

I assume passwordless refers to social login (which we’d like to use).

---

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [December 15, 2025, 2:05pm UTC](https://community.auth0.com/t/howto-add-custom-claims-during-sign-up/195494/4 "2025-12-15T14:05:52Z")

</div>

Hi @cpuidle,

Welcome to the Auth0 Community!

The Pre-user Registration Trigger can only be triggered by a Database Connection or a Passwordless Connection. While the action cannot add metadata to users from the Passwordless Connection, it will still be able to trigger the action; a social connection will not even trigger this action.

A Post-user Login Action can be triggered from any Connection.

[https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger)

And can be used to manage user metadata:

[https://auth0.com/docs/manage-users/user-accounts/metadata/manage-user-metadata](https://auth0.com/docs/manage-users/user-accounts/metadata/manage-user-metadata)

You can check if this is the user’s first time logging in by checking `event.stats.logins_count`, and then you can execute your code.

[https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object)

If you have any further questions, don’t hesitate to reach out.

Have a good one,  
Vlad

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 29, 2025, 2:06pm UTC](https://community.auth0.com/t/howto-add-custom-claims-during-sign-up/195494/5 "2025-12-29T14:06:15Z")

</div>

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