# Send some users to new frontend application

**URL:** <https://community.auth0.com/t/send-some-users-to-new-frontend-application/193126>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [October 13, 2025, 1:08pm UTC](https://community.auth0.com/t/send-some-users-to-new-frontend-application/193126 "2025-10-13T13:08:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjansen88](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rjansen88/32/73407_2.png) [@rjansen88](https://community.auth0.com/u/rjansen88)\
**Post date:** [October 13, 2025, 1:08pm UTC](https://community.auth0.com/t/send-some-users-to-new-frontend-application/193126/1 "2025-10-13T13:08:09Z")

</div>

We got a new version of our frontend application. We want to roll it out slowly, so thinking about to have a environment meta data if the users should see the new or the current version.

I created a login action, dont think that the authentication and other variables are send. Is there a good way in auth0 or do we need to implement it into the frontend?

```auto
exports.onExecutePostLogin = async (event, api) => {
  if (
    event.organization != null
    && event.organization.metadata.new_frontend
  )
  {
    api.redirect.sendUserTo("https://my-app.example.com");
  }
};

```

For both version we have a client\_id, so maybe change the client\_id or something like that

---

<div class="post-metadata">

**Author:** ![teodor.andrei](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teodor.andrei/32/75320_2.png) [@teodor.andrei](https://community.auth0.com/u/teodor.andrei)\
**Post date:** [October 14, 2025, 9:30am UTC](https://community.auth0.com/t/send-some-users-to-new-frontend-application/193126/3 "2025-10-14T09:30:04Z")

</div>

Hi @rjansen88 and welcome back to the Auth0 Community!

Instead of forcing a redirect from within the Action, the recommended approach is to **add a custom claim to the user’s ID Token**. Your frontend application can then read this claim and decide whether to render the new or the current version. This decouples your authentication logic from your application’s routing.

[Here](https://support.auth0.com/center/s/article/adding-custom-claims-to-tokens) is a knowledge article that goes into detail on how to add custom claims.

I wish you a great day!  
Teodor.

---

<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:** [October 28, 2025, 9:30am UTC](https://community.auth0.com/t/send-some-users-to-new-frontend-application/193126/4 "2025-10-28T09:30:36Z")

</div>

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