# Can't get universal login to work

**URL:** <https://community.auth0.com/t/cant-get-universal-login-to-work/23727>\
**Category:** Get Help\
**Created:** [April 9, 2019, 10:59am UTC](https://community.auth0.com/t/cant-get-universal-login-to-work/23727 "2019-04-09T10:59:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShoeyAuthor](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shoeyauthor/32/11860_2.png) [@ShoeyAuthor](https://community.auth0.com/u/ShoeyAuthor)\
**Post date:** [April 9, 2019, 10:59am UTC](https://community.auth0.com/t/cant-get-universal-login-to-work/23727/1 "2019-04-09T10:59:46Z")

</div>

So I have an angular 7 client using Auth0. Till now I’ve used the standard embedded login. Right now I have the auth.Login() method in my navbar. My callback URL are just my homepage at localhost/4200. It works, I’m getting redirected back and I’m now authenticated. So now I’d change from auth.Login() to an href with a direct link to the universal login from the dashboard at: https://{YourDomain}.auth0.com/login?client={ClientID}

I am still visiting my login page and able to login if provided correct credentials. Even so, after the login I am redirected back to my homepage but with an URL of “[http://localhost:4200/items?code=zP2Ve9\_OaiXJjTuP&amp;state=tcz0Ho-4Bpb-t~sQrvsls88yS8c2DNh9](http://localhost:4200/items?code=zP2Ve9_OaiXJjTuP&amp;state=tcz0Ho-4Bpb-t~sQrvsls88yS8c2DNh9)” instead of localhost:4200/items (= localhost:4200). I am also not authenticated. What are this code and state messages and what am I doing wrong? I’ve changed nothing but the one URL which should seemingly do the rest itself.

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [April 11, 2019, 2:47am UTC](https://community.auth0.com/t/cant-get-universal-login-to-work/23727/3 "2019-04-11T02:47:39Z")

</div>

Hi @ShoeyAuthor,

From the looks of it, you are redirecting directly to the `/login` endpoint. Instead, you should be calling the `/authorize` endpoint with all the required parameters, which in turn will automatically perform the redirect to the `/login` page. This is outlined in the [API documentation](https://auth0.com/docs/api/authentication#database-ad-ldap-passive-).

If you are using Auth0.js, you could use the `authorize()` method, which might be easier to implement.  
[https://auth0.com/docs/libraries/auth0js/v9#login](https://auth0.com/docs/libraries/auth0js/v9#login)

---

<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:** [September 2, 2019, 9:51am UTC](https://community.auth0.com/t/cant-get-universal-login-to-work/23727/4 "2019-09-02T09:51:58Z")

</div>

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