damienbod / angular-auth-oidc-client

npm package for OpenID Connect, OAuth Code Flow with PKCE, Refresh tokens, Implicit Flow
https://www.npmjs.com/package/angular-auth-oidc-client
MIT License
1.15k stars 433 forks source link

[Bug]: popup closes immediately when angular dev tools extension installed in Chrome #1882

Open jnizet opened 10 months ago

jnizet commented 10 months ago

Version

16.0.1

Please provide a link to a minimal reproduction of the bug

NA

Please provide the exception or error you saw

NA

Steps to reproduce the behavior

Install and enable the Angular dev tools extension in Chrome.
Then initiate an authorization with popup (I've noticed that the bug happens if the authorization is launched immediately, without waiting for a click on a button from the user).

A clear and concise description of what you expected to happen.

The popup should open and display the login page of the authorization server (keycloak in my case). But instead, the popup closes immediately.

The problem seems to be caused by this line of code: https://github.com/damienbod/angular-auth-oidc-client/blob/d71e3bf093fd27547ef4db7e726e3794f36648d5/projects/angular-auth-oidc-client/src/lib/login/popup/popup.service.ts#L76

The listener immediately receives an event with the following `data`:

{"isIvy":true,"isAngular":true,"isDebugMode":true,"isSupportedAngularVersion":true,"isAngularDevTools":true}

Additional context

No response

RutsuKun commented 8 months ago

React Developer Tools too