# Auth0 redirect is not working properly, Angular automatically redirects to base route

**URL:** <https://community.auth0.com/t/auth0-redirect-is-not-working-properly-angular-automatically-redirects-to-base-route/59679>\
**Category:** Get Help\
**Created:** [March 18, 2021, 9:43pm UTC](https://community.auth0.com/t/auth0-redirect-is-not-working-properly-angular-automatically-redirects-to-base-route/59679 "2021-03-18T21:43:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jakemangan1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jakemangan1/32/12805_2.png) [@jakemangan1](https://community.auth0.com/u/jakemangan1)\
**Post date:** [March 18, 2021, 11:34pm UTC](https://community.auth0.com/t/auth0-redirect-is-not-working-properly-angular-automatically-redirects-to-base-route/59679/2 "2021-03-18T23:34:30Z")

</div>

Hello,

It seems I’ve found the answer to my question in this thread: [Redirect URI issue after successful login with @auth0/auth0-angular](https://community.auth0.com/t/redirect-uri-issue-after-successful-login-with-auth0-auth0-angular/58111)

The solution was to add `appState: { target: "/url" }` as a parameter to the call to loginWithRedirect method.

I’ve tried this, and it works correctly.

This is really something that should be mentioned in your docs and in the Angular Quickstart and Angular Complete Guide. It’s very confusing for someone new to Auth0 and I believed it was an Angular issue, so I was looking at completely the wrong places for a solution.

I’d like to ask, given that the Auth0 SDK will redirect the user to the base route of their application regardless of the value of the `redirect_url` option in the call to `loginWithRedirect`, what is actually the point of this option? Is it so that the developer can add extra logic to a particular route and have Auth0 redirect to that route to execute the login after authentication? Or perhaps another reason?

I’m just curious why it exists as it’s confusing to expect the SDK to redirect to the supplied URL, when that doesn’t actually happen.

---

_[View the full topic](https://community.auth0.com/t/auth0-redirect-is-not-working-properly-angular-automatically-redirects-to-base-route/59679)._
