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

Facebook logins stopped working on Android devices #1068

Open
jobinkurianm opened this issue Jan 19, 2024 · 12 comments
Open

Facebook logins stopped working on Android devices #1068

jobinkurianm opened this issue Jan 19, 2024 · 12 comments
Assignees

Comments

@jobinkurianm
Copy link

jobinkurianm commented Jan 19, 2024

Describe your environment

Issue noticed in mobile web : Android devices + chrome browser

Operating system: Android 12
Chrome version : 120.0.6099.230
Configuration used : 'signInFlow': 'popup',
Tried different firebase-ui-auth versions 6.1.0, 6.0.0 with firebase JS SDK v9 & v10 compat, but no luck.

Describe the problem

In mobile devices Facebook login is not working , No error message/ warnings displayed.
Created exactly same project & updated firebase configurations:- https://fir-ui-demo-84a6c.firebaseapp.com/

Steps to reproduce:

Create exactly same project - https://fir-ui-demo-84a6c.firebaseapp.com/ and try it on chrome browser in an android device
( 'signInFlow': 'popup')
Click facebook login , after login from facebook it will just land on app-login page. without logging in.

Additional information

Working fine in desktop browsers and IOS Devices .
Also noticed, if we changed 'signInFlow': 'redirect', it will work first time , (second time we need to clear the cookie to make it work)

@jobinkurianm jobinkurianm changed the title Face book login stopped working in Android devices Facebook logins stopped working on Android devices Jan 19, 2024
@jhuleatt jhuleatt self-assigned this Jan 22, 2024
@jhuleatt
Copy link
Collaborator

Hi @jobinkurianm, I'll update the Facebook setup for our live demo so I can see if I can reproduce this issue. In the meantime, I wonder if this might be an issue with the underlying Firebase JS SDK - see firebase/firebase-js-sdk#7958 for more info.

@jobinkurianm
Copy link
Author

@jhuleatt Yes, Looks like issue with firebase SDK itself . Tried direct implementation using 'signInWithPopup',
but getting error 'Firebase: Error (auth/popup-closed-by-user)'

@jhuleatt
Copy link
Collaborator

Thanks for confirming. Along with the previous issue I mentioned (firebase/firebase-js-sdk#7958), it's probably worth keeping an eye on this issue too: firebase/firebase-js-sdk#7807.

@cptnoblivious
Copy link

Having this same issue on our production site. Worse, both signInWithPopup() and signInWithRedirect() are affected in both the 120.x and beta 123.x versions of Chrome, specifically on Android. Literally all other browsers on all other platforms work fine - including Chromium-based browsers on Android such as Adblock Browser.

@gsfeng
Copy link

gsfeng commented May 16, 2024

Is there any solution to this?

@Ishan5hrestha
Copy link

did anybody solve this?

@jacquesgiraudel
Copy link

Same problem for me, works fine on Desktop and iOS device but not on Android: signInWithPopup returns auth/popup-closed-by-user, signinWithRedirect does not work (getRedirectResult(getAuth()) returns null after redirect).

@CT-HTrieu
Copy link

Same problem for me, works fine on Desktop device but not on Browser mobile android and ios: signInWithPopup returns auth/popup-closed-by-user, signinWithRedirect does not work (getRedirectResult(getAuth()) returns null after redirect).

@CT-HTrieu
Copy link

Same problem for me, works fine on Desktop and iOS device but not on Android: signInWithPopup returns auth/popup-closed-by-user, signinWithRedirect does not work (getRedirectResult(getAuth()) returns null after redirect).

do you have any solution??

@NhienLam
Copy link
Contributor

NhienLam commented Sep 27, 2024

Hi everyone,

  1. Does this issue also occur in other browsers?
  2. Could you check if your authDomain matches the domain you're using? If not, please try updating your authDomain to match the domain you're using and see if the flow works.

For example, if your web domain is "example.com",
your authDomain should also be "example.com"

Also ensure that you've add your domain to the list of authorized domains in the Firebase console (Authentication -> Settings).

We're investigating why this is occurring only on Android devices and Facebook provider. Thank you for your patience.

@dmitry-yudakov
Copy link

dmitry-yudakov commented Sep 30, 2024

We ended up implementing Facebook native login for the web combined with Firebase manual sigh-in flow (signInWithCredential created with accessToken from fb SDK).

It took some time for Facebook to convince us the login was indeed broken - it worked perfectly fine on desktop, just not on mobile - but somehow they don't provide details like this in the violation reports.

@jacquesgiraudel
Copy link

Thank you for the advice, I note the solution

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

9 participants