zenG2K
zenG2K

Reputation: 1

oidc-client-ts cause multiple popup on siginPop in an angular application using Auth0 for authentication

I m trying to use auth0 in an angular application. I m using oidc-client-ts. While hitting usermanager.signinPopup, i m getting multiple popup continuously. How can I resolve this?

` export class SignCallbackComponent implements OnInit {

  private authService = inject(AuthService)
  private router = inject(Router)
  private user: User | undefined

  ngOnInit(): void {
    this.startAuthentication()

  }
  startAuthentication() {
    this.authService.usermanager?.signinPopup().then((res) => {
      console.log(res)
    })
  }

}
export class AuthService {
  usermanager: UserManager | undefined;


  usermanager_properties: any = {
    authority: 'https://**.us.auth0.com',
    client_id: 'client_id',
    client_secret: 'secret',
    redirect_uri: `https://f4f5-21-323-8-11.ngrok-free.app/login`,
    response_type: 'code',
    respone_mode: 'query',
    scope: 'openid profile email api'
  }
  constructor() {

    this.usermanager = new UserManager(this.usermanager_properties)
  }
}`

pop up screenshots

How to resolve this issue?

Upvotes: 0

Views: 59

Answers (0)

Related Questions