Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

495
Views
Cómo redirigir a http://localhost:4200/shops/shop1/dashboard después de iniciar sesión auth0 en Angular

Auth0 no redirige a http://localhost:4200/shops/shop1/dashboard después de iniciar sesión. Solo vuelve a llamar a la raíz http://localhost:4200 después de iniciar sesión.

El documento oficial de Auth0 dice:

Después de que el usuario se autentique, solo devolveremos la llamada a cualquiera de estas URL. Puede especificar varias URL válidas separándolas con comas (normalmente para manejar diferentes entornos como control de calidad o pruebas). Asegúrese de especificar el protocolo (https://), de lo contrario, la devolución de llamada puede fallar en algunos casos. Con la excepción de los esquemas de URI personalizados para clientes nativos, todas las devoluciones de llamada deben usar el protocolo https://. Puede utilizar los parámetros de URL de la organización en estas URL.

URL de devolución de llamada permitidas en la cuenta Auth0:

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

Orígenes web permitidos:

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

Orígenes permitidos (CORS)

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

Inicie sesión en Auth0 incorporado usando el servicio de autenticación

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

Gracias por su tiempo de antemano :)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Lo tengo como:

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

y funciona bien :)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!