Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

502
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda