Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signInWithPopup flow rejects with auth/popup-closed-by-user after around 8 seconds #8367

Open
aikewoody opened this issue Jul 16, 2024 · 7 comments

Comments

@aikewoody
Copy link

aikewoody commented Jul 16, 2024

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/aikewoody/example-firebase-oidc

  1. Call the signInWithPopup function
  2. Wait for around 8 seconds and the error appears
@aikewoody aikewoody added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Jul 16, 2024
@hsubox76
Copy link
Contributor

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?

@hsubox76 hsubox76 added duplicate and removed question new A new issue that hasn't be categoirzed as question, bug or feature request labels Jul 16, 2024
@aikewoody
Copy link
Author

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!

@AhmadHumayun
Copy link

AhmadHumayun commented Jul 28, 2024

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).

@AhmadHumayun
Copy link

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

@aikewoody
Copy link
Author

@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
Copy link

@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}

@aikewoody
Copy link
Author

@AhmadHumayun Unfortunately that doesn't solve the issue but thanks for thinking along!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants