# Page is not redirected to sso Auth login page with the code shown

**URL:** <https://community.auth0.com/t/page-is-not-redirected-to-sso-auth-login-page-with-the-code-shown/75126>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [December 17, 2021, 6:19pm UTC](https://community.auth0.com/t/page-is-not-redirected-to-sso-auth-login-page-with-the-code-shown/75126 "2021-12-17T18:19:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aadeez.13](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/aadeez.13/32/33588_2.png) [@aadeez.13](https://community.auth0.com/u/aadeez.13)\
**Post date:** [December 17, 2021, 6:19pm UTC](https://community.auth0.com/t/page-is-not-redirected-to-sso-auth-login-page-with-the-code-shown/75126/1 "2021-12-17T18:19:41Z")

</div>

I have followed code shown in this [blog](https://auth0.com/blog/securing-angular-applications-with-auth0-and-deploying-to-netlify/?_ga=2.164231743.1859268967.1639627265-1808540019.1636609186&_gl=1*13qian7*rollup_ga*MTgwODU0MDAxOS4xNjM2NjA5MTg2*rollup_ga_F1G3E656YZ*MTYzOTcyMjI3NS41Mi4xLjE2Mzk3MjI5MTUuMTM.), but page gets reloaded after successful login . It takes user to SSO auth login page and after successful login, page keeps getting refreshed continuously.

After changing my code to this [issue](https://github.com/auth0-samples/auth0-angular-samples/issues/181) , my page never gets redirected to auth0 login page.

My redirecting is different for different user i.e.  
localhost:4200/dashboard?key=abc  
localhost:4200/dashboard?key=xyz

so what should be kept in callback URLS in auth0 settings and also in the _redirect\_uri_ in _authClient_ object?

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [December 28, 2021, 2:53pm UTC](https://community.auth0.com/t/page-is-not-redirected-to-sso-auth-login-page-with-the-code-shown/75126/2 "2021-12-28T14:53:13Z")

</div>

Hi there Aadeez!

> [@aadeez.13](#):
>
> so what should be kept in callback URLS in auth0 settings and also in the _redirect\_uri_ in _authClient_ object?

Callback URLs can be described as a URL in your application where Auth0 redirects the user after they have authenticated. The callback URL for your app must be added to the **Allowed Callback URLs** field in your [Application Settings](https://manage.auth0.com/#/applications). If this field is not set, users will be unable to log in to the application and will get an error.

When it comes to your _redirect\_uri_ you want to include where you would like to redirect the client to. Example:

```auto
// either with async/await
document.getElementById('login').addEventListener('click', async () => {
  await auth0.loginWithRedirect({
    redirect_uri: 'http://localhost:3000/'
  });
  //logged in. you can get the user profile like this:
  const user = await auth0.getUser();
  console.log(user);
});

```

---

<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:** [January 12, 2022, 2:53pm UTC](https://community.auth0.com/t/page-is-not-redirected-to-sso-auth-login-page-with-the-code-shown/75126/3 "2022-01-12T14:53:50Z")

</div>

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