Google signin with popup not working in lazy loaded routes that are part of a module
Version info Angular: 13.2
Firebase: 9.6.7
AngularFire: 7.2.1
How to reproduce these conditions Created a new angular 13 app, created an authentication module that contains login / register / forgot password, lazy loaded that module in the routing module. Attempting google signingWithPopup from the login component does not work, only refreshes the page. Attempting the same thing in AppComponent works!
Steps to set up and reproduce
- create a new angular app w/ routing
- create an auth module
- create a login component as part of this module
- lazy load said module in the app-routing module
- try the google signin from the login component
- it refreshes the page, with no pop up presented
Sample data and security rules
None
Debug output
There is no error produced, just a page refresh
Expected behavior
Google signing popup should be fired from any module / component
Actual behavior
It is only fired from the AppComponent, or from components loaded directly in the routes
This issue does not seem to follow the issue template. Make sure you provide all the required information.
It is presented in my code please check if your browser is blocking popups it usually happens in modern browsers.
And this is the correct method to invoke the popup in the V9 modular.
signInWithPopup(this.auth, new GoogleAuthProvider()).then(async (credentials:UserCredential)=>{})