# Implementation of login and logout redirect to page of origin in Angular

**URL:** <https://community.auth0.com/t/implementation-of-login-and-logout-redirect-to-page-of-origin-in-angular/111070>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [July 12, 2023, 4:21am UTC](https://community.auth0.com/t/implementation-of-login-and-logout-redirect-to-page-of-origin-in-angular/111070 "2023-07-12T04:21:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lawerhcaesar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lawerhcaesar/32/48797_2.png) [@lawerhcaesar](https://community.auth0.com/u/lawerhcaesar)\
**Post date:** [July 12, 2023, 4:21am UTC](https://community.auth0.com/t/implementation-of-login-and-logout-redirect-to-page-of-origin-in-angular/111070/1 "2023-07-12T04:21:03Z")

</div>

I’m trying to redirect the callback uri to the page that a login or logout request came from but keep failing to succeed.

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [July 12, 2023, 1:34pm UTC](https://community.auth0.com/t/implementation-of-login-and-logout-redirect-to-page-of-origin-in-angular/111070/3 "2023-07-12T13:34:38Z")

</div>

Hey there and welcome in Auth0 @lawerhcaesar !

Sounds like a small misconfiguration. Could you please try this two things:

1. In your `auth0-variables.ts file`, please make sure you refer to the intended Auth0-tenant data (you have currently two tenants, in one of them you passed both localhost and public URIs as the allowed callbacks, on the second one only localhost).

2. If the Callback URI in a format `https://yourspa.com` seems not working, please try adding /callback at the end: `https://yourspa.com/callback`

Please come back to us with feedback if it works for you! Thanks!

---

<div class="post-metadata">

**Author:** ![lawerhcaesar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lawerhcaesar/32/48797_2.png) [@lawerhcaesar](https://community.auth0.com/u/lawerhcaesar)\
**Post date:** [July 13, 2023, 3:54pm UTC](https://community.auth0.com/t/implementation-of-login-and-logout-redirect-to-page-of-origin-in-angular/111070/4 "2023-07-13T15:54:09Z")

</div>

Am I supposed to create an auth0-variables.ts file?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [July 13, 2023, 4:15pm UTC](https://community.auth0.com/t/implementation-of-login-and-logout-redirect-to-page-of-origin-in-angular/111070/5 "2023-07-13T16:15:17Z")

</div>

I am referring to Auth0 quickstart guidance on how to implement it in Angular.I encourage you to take advantage of them as well as read topics related to your problem that you can find on this community. Thanks!

---

<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:** [July 27, 2023, 4:15pm UTC](https://community.auth0.com/t/implementation-of-login-and-logout-redirect-to-page-of-origin-in-angular/111070/6 "2023-07-27T16:15:39Z")

</div>

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