# Help me with redirect to login after password change

**URL:** <https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [October 3, 2025, 9:20pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763 "2025-10-03T21:20:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![roman.savchuk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/roman.savchuk/32/59812_2.png) [@roman.savchuk](https://community.auth0.com/u/roman.savchuk)\
**Post date:** [October 3, 2025, 9:20pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763/1 "2025-10-03T21:20:21Z")

</div>

Hi everyone. I need urgent help.

I implemented auth0 login in my project. I called loginWithRedirect and opened auth0 login form. And in login action I wrote this code to redirect to password reset page.

```auto
exports.onExecutePostLogin = async (event, api) => {
if (event?.user?.user_metadata?.is_password_temp) {
const tokenResponse = await fetch(\`https://tenant_domain/oauth/token\`, {

  method: 'POST',

  headers: { 'Content-Type': 'application/json' },

  body: JSON.stringify({

    client_id: 'm2m client id',

    client_secret: ‘m2m client secret‘,

    audience: \`audience goes here\`,

    grant_type: 'client_credentials'

  })

});

if (!tokenResponse.ok) {

  throw new Error(\`Failed to fetch access token: ${tokenResponse.statusText}\`);

}

const tokenData = await tokenResponse.json();

const accessToken = tokenData.access_token;

const ticketResponse = await fetch(\`https://terman domain/api/v2/tickets/password-change\`, {

  method: 'POST',

  headers: {

    'Authorization': \`Bearer ${accessToken}\`,

    'Content-Type': 'application/json'

  },

  body: JSON.stringify({

    client_id: 'spa client id',

    user_id: event.user.user_id

  })

});

const ticketData = await ticketResponse.json();

const resetUrl = ticketData.ticket;

api.redirect.sendUserTo(

  resetUrl

);
}

};

```

This code work well and redirected to password reset page after login success.

I blocked here. After success password reset, I need to go auth0 login page directly again. How should I do?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [October 6, 2025, 5:04pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763/3 "2025-10-06T17:04:44Z")

</div>

Hi @roman.savchuk

Welcome to the Auth0 Community!

In order to have the user redirected to the application’s login page, you will need to configure a [default login route](https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes).

You can do that by going to your application within the Auth0 Dashboard → Settings → **Application Login URI** or you can configure a tenant wide one by going to the Dashboard → Settings → Advanced → Tenant Login URI. These will display a button on the password reset success page which will redirect them to the login page again. Unfortunately, it is not possible to redirect the user automatically once they have successfully reset they password unless this functionality is handled within a custom page and not by Auth0’s Universal Login.

If you have any other questions, let me know!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![roman.savchuk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/roman.savchuk/32/59812_2.png) [@roman.savchuk](https://community.auth0.com/u/roman.savchuk)\
**Post date:** [October 6, 2025, 8:24pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763/4 "2025-10-06T20:24:33Z")

</div>

Thanks for your reply. I want to go auth0 login page after password reset success by clicking link.

So according to your reply, I think I need to set tenant login url here.

Dashboard → Settings → Advanced → Tenant Login URI

for example if my tenant main url is [example.us.auth0.com](http://example.us.auth0.com), what url I should set for tenant login url?

[https://example.us.auth0.com](https://example.us.auth0.com)? or [https://example.us.auth0.com/u/login](https://example.us.auth0.com/u/login)?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [October 7, 2025, 5:39pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763/5 "2025-10-07T17:39:46Z")

</div>

Hi again!

The URL should be the one pointing to your `/authorize` endpoint of your application. In most instances, this should be `https://example.us.auth0.com/u/login`.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![roman.savchuk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/roman.savchuk/32/59812_2.png) [@roman.savchuk](https://community.auth0.com/u/roman.savchuk)\
**Post date:** [October 7, 2025, 6:52pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763/6 "2025-10-07T18:52:32Z")

</div>

Thanks for your reply. I added [https://example.us.auth0.com/u/login](https://example.us.auth0.com/u/login) in ternalt login uri. of course I used my tenant domain. But I still can not see link on password reset page.

Ok. If this is impossible I will turn on app manually after password reset success.

And I need other difficult on my project. My project is angular+ionic+capacitor project.

In development mode, I use google chrome.

If I call loginWithRedirect function when click button, auth0 login page displayed and after login success returned to [http://localhost:8100](http://localhost:8100) automatically. Of course I added [http://localhost:8100](http://localhost:8100) in allowed web origins, allowed callback urls, allowed logout urls on auth0 dashboard. and As redirect url, I setted [http://localhost:8100](http://localhost:8100) in my project. But this is development mode. I need to do the same thing in production mode- on emulator and real phone, not web browser.

In this case what url should I use for redirect url?

Thanks.

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [November 12, 2025, 8:30pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763/8 "2025-11-12T20:30:52Z")

</div>

Hi again @roman.savchuk

Sorry for the late reply to your last post on the topic.  
Do you still experience the mentioned issues above?

> Thanks for your reply. I added [https://example.us.auth0.com/u/login](https://example.us.auth0.com/u/login) in ternalt login uri. of course I used my tenant domain. But I still can not see link on password reset page.

That is the correct login url that you should be using. That should do the trick in order to have the button displayed after a successful password reset. It should say "Back to {{Application.Name}}. Do you use any custom page templates or the default ones from Auth0?

> In this case what url should I use for redirect url?

Here you will be using the page on which you need to redirect the user to, specifically the home page/profile etc. For example, once Auth0 redirects back to the application, it should visit either `my_web_page.example.com` or `my_web_page.example.com/home` if you are using protected routes/pages for unauthenticated users. It really depends which page was the user one before redirection and where you need the user to land after authentication.

Kind Regards,  
Nik

---

<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:** [November 26, 2025, 8:31pm UTC](https://community.auth0.com/t/help-me-with-redirect-to-login-after-password-change/192763/9 "2025-11-26T20:31:33Z")

</div>

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