Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

503
Vistas
How to redirect to http://localhost:4200/shops/shop1/dashboard after auth0 login in Angular

Auth0 does not redirect to http://localhost:4200/shops/shop1/dashboard after login. It only calls back to root http://localhost:4200 after login.

Auth0 official document says:

After the user authenticates we will only call back to any of these URLs. You can specify multiple valid URLs by comma-separating them (typically to handle different environments like QA or testing). Make sure to specify the protocol (https://) otherwise the callback may fail in some cases. With the exception of custom URI schemes for native clients, all callbacks should use protocol https://. You can use Organization URL parameters in these URLs.

Allowed Call Back URLs in Auth0 account:

http://localhost:4200/pages/welcome, http://localhost:4200/shops/shop1/dashboard,
http://localhost:4200

Allowed Web Origins:

http://localhost:4200, http://localhost:4200/shops/shop1/dashboard

Allowed Origins (CORS)

http://localhost:4200, http://localhost:4200/shops/shop1/dashboard

Login Auth0 built-in using auth service

    loginWithRedirect(): void {
        // Call this to redirect the user to the login page
        this.auth.loginWithRedirect();
      }

Thanks for your time in advance :)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I got it as:


<button
  *ngIf="(auth.isAuthenticated$ | async) === false"
  (click)="loginWithRedirect({
    appState: { target: '/shops/shop1/dashboard' }
  })">
  Log in
</button>

and its working fine :)

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda