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
auth/popup-closed-by-user error throws 7+ seconds after popup is closed #8061
Comments
Hi @GriffinJohnston, thanks for the report. I was able to reproduce the behavior now. Let me check what we can do for this issue or bring someone here that can provide more context about it. I’ll update this thread if I have any information to share. |
I'm encountering the same problem. In my application, I disable a button during the user login process with |
I'm encountering exactly the same problem. My project is in Vue 3 and the issue occurs in every browser I tried it (Chrome, Firefox, Safari). |
I'm seeing the same issue for my Flutter project when running in Chrome. |
I've done some research and found the part of the code that causes the long delay. A polling process checks if the popup was closed, and its timeout was increased from 2 seconds to 8 seconds in a commit on April 15th, 2023, which was then released on April 27th, 2023. This change was made to address an issue in Firefox.
The relevant code changes can be seen here:
@prameshj, could you please have a look at this? The adjustment that was made for Firefox has significant affected the user experience. I am also including @silas, the author of the original issue to have a look at this. I hope we can find a solution that will solve this delay while still keeping the other issue solved. Perhaps the delay could be made customizable (and we can perform a browser check to see which delay to pass). OR another 'soft reject' callback could be passed which would trigger after the original 2000ms mark, so the UI can be updated already before the final rejection takes place. (In my case, I only want to remove a loading indicator from the login button after the popup is closed) For whoever needs a quick HACKY fix for this; this snippet overrides the global
(use at your own risk) |
We gave up on using If it gets reverted a warning should probably get added to Ideally the special case for Firefox could be fixed to not rely on polling/timeouts, but because I don't have access to the code, I really have no idea if that's possible. |
I am also seeing this issue when using |
Operating System
macOS Sonoma
Browser Version
Chrome 122.0.6261.112
Firebase SDK Version
10.8.1
Firebase SDK Product:
Auth
Describe your project's tooling
React app with Webpack
Describe the problem
There is an incredibly long delay after an oAuth popup is closed before the
auth/popup-closed-by-user
error is thrown. Consistently 7 or 8 seconds.Steps and code to reproduce issue
signInWithPopup
orreauthenticateWithPopup
The text was updated successfully, but these errors were encountered: