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

I have followed code shown in this blog, 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 , 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?

Hi there Aadeez!

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. 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:

// 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);
});

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