`signInWithPopup` flow rejects with `auth/popup-closed-by-user` after around 8 seconds
Operating System
macOS 14.5 (23F79)
Browser Version
Chrome version 126.0.6478.127 (Official Build) (arm64)
Firebase SDK Version
10.12.3
Firebase SDK Product:
Auth
Describe your project's tooling
A bare Next.js (14.2.5) project
Describe the problem
In our project we are using a custom OIDC provider for OpenID Connect that's called Somtoday
Their OpenID configuration can be found at: https://somtoday.nl/.well-known/openid-configuration
When initiating the popup sign-in flow the user gets some sort of timeout after around 8 seconds, regardless of what the user is doing (nothing or filling in their credentials within the popup).
A video of the process can be found here: https://youtu.be/qe0TWhU3l-k
Steps and code to reproduce issue
A minimal reproducible example: https://github.com/aike19115/example-firebase-oidc
- Call the
signInWithPopupfunction - Wait for around 8 seconds and the error appears
Looks like a duplicate of https://github.com/firebase/firebase-js-sdk/issues/8061 - there seems to be valuable repro info here so can you paste the contents of this issue into #8061?
Looks like a duplicate of #8061 - there seems to be valuable repro info here so can you paste the contents of this issue into #8061?
Ticket #8061 is about a delay in the error message after the user has actively closed the popup.
This issue is about the popup flow not working because that error message is shown even when the user hasn't closed the popup.
That's why I think this issue should be looked at, even though the other ticket mentions the same error message.
ps: thanks for the quick reply that's much appreciated!
Same issue on brave browser (Version 1.68.131).
Code: const provider = new GoogleAuthProvider(); provider.setCustomParameters({ prompt: "select_account", }); const response = await signInWithPopup(auth, provider);
Error: FirebaseError: Firebase: Error (auth/popup-closed-by-user).
Same issue on brave browser (Version 1.68.131).
Code: const provider = new GoogleAuthProvider(); provider.setCustomParameters({ prompt: "select_account", }); const response = await signInWithPopup(auth, provider);
Error: FirebaseError: Firebase: Error (auth/popup-closed-by-user).
@aikewoody my issue was testing on dev domain and in authConfig in firebase configuration i have my prod domain. it works on production domain. hope that helps
@AhmadHumayun Thanks for your message
We are running dev (local forward from https://app.${domain}.com to http://localhost:3000) and prod on the same domain. Also the firebase auth handler is on the same domain: https://firebase.${domain}.com
@AhmadHumayun Thanks for your message
We are running dev (local forward from https://app.${domain}.com to http://localhost:3000) and prod on the same domain. Also the firebase auth handler is on the same domain: https://firebase.${domain}.com
whatever is the prod domain that should be in authDomain in config if its app.${domain}.com then in authDomain in config should be app.${domain}
@AhmadHumayun Unfortunately that doesn't solve the issue but thanks for thinking along!
@aike19115 have you solved the problem? I have encountered the same issue.
Error FirebaseError: Firebase: Error (auth/popup-closed-by-user).
@PrtHub,
I just tried to reproduce this with GoogleAuthProvider and FacebookAuthProvider but I didn't enounter an error. Could you provide the code for your use case? Thanks!
it's just solved automatically, I couldn't identify the real issue.
Thanks!
Yes, it's odd. I recall being able to reproduce it before but now I can't anymore.
I wonder if this was due to a browser issue setting the closed status of the popup that has since been fixed.
I'll leave this as open for now but the bot should close it in a few weeks. If anyone can still reproduce it then please post here. If the issue closes first and then later someone encounters the issue, then please create a new Issue and link to this one in its description. Thanks!
@DellaBitta
Using the minimal reproducible example: https://github.com/aike19115/example-firebase-oidc
I am able to reproduce it, have also tested with the latest Firebase js sdk version 11.1.0 and the error still occurs.
Using the minimal reproducible example: https://github.com/aike19115/example-firebase-oidc I am able to reproduce it, have also tested with the latest Firebase js sdk version
11.1.0and the error still occurs.
Thank you for the easy to follow minimal repro- it's greatly appreciated by the team!
I was able to confirm the behaviour you described in the issue by using your example repo, so I've labelled this as a bug.
I am facing a very similar issue. Well specifically the 8 second part.
I have setup google as auth provider in my firebase project using an app built with firebase studio. At this time, it is a very simple angular app that just allows the use to login using a google account and intends to navigate to a sample logged in page. I am using chrome browser.
appreciate any help with somebody who has use this setup successfully.