How do I get single-sign-on to work with auth0-javascript-samples/02-Calling-an-API?

Thanks for your help and the information! But I’m still confused. If I look at the source code in the QuickStart sample project I’m using, I can see that it is doing await auth0.loginWithRedirect(options) to log in. Doesn’t that use Universal Login, not Embedded Login?

Also, the QuickStart documentation for making a single-page app with Javascript says to use auth0.loginWithRedirect(). And this documentation specifically says that this will “redirect to the Auth0 Universal Login Page”.

Furthermore, when I click on the “Log in” button in the provided SPA project, I can see via the browser URL bar that I have been redirected to a site hosted by Auth0. I.e., this is what I see in the URL bar:

https://dev-ri-cdie3.auth0.com/login?state=g6Fo2SBTY1lLY0V5SXlOMlpjWVJDR1RUTWNMdGlJLWlGQS14ZaN0aWTZIEdTWGt5LVlYdVVmWUtYcm1WdVF4Tm16b1hLMlQ0UmRVo2NpZNkgSjVjRkE3WldzeHZyNTJxSkRNdmpJYUpKMVphYkoyTko&client=J5cFA7ZWsxvr52qJDMvjIaJJ1ZabJ2NJ&protocol=oauth2&audience=http%3A%2F%2Fauth0-api-sample&cacheLocation=localStorage&scope=openid%20profile%20email&response_type=code&response_mode=query&nonce=xg37IoD7F8gSYOLal2YM-00Qvsd0Dk-8MP5Ns4gagPd&redirect_uri=http%3A%2F%2Flocalhost%3A3000&code_challenge=bp3SaQi-AB42XhS07slYNcDIyniD829A5aaQUKuaHSA&code_challenge_method=S256&auth0Client=eyJuYW1lIjoiYXV0aDAtc3BhLWpzIiwidmVyc2lvbiI6IjEuMi40In0%3D

Thanks!
|>ouglas

1 Like