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

Safari does not work on MacOS. It does not work at all on iOS devices - nor Chrome, nor Safari in redirect mode. #1072

Closed
Boardtale opened this issue Feb 26, 2024 · 1 comment

Comments

@Boardtale
Copy link

Boardtale commented Feb 26, 2024

[REQUIRED] Describe your environment

  • Operating System version: newest iOS newest macOS
  • Firebase UI version: 6.1.0
  • Firebase SDK version: 10.8.0

[REQUIRED] Describe the problem

Customers can't login to the system because they are not redirected or redirected but nothing happens.
I'm not sure if it's related but Safari and iOS are blocking 3rd party cookies and Firefox by default does to. Chrome will at some point also. https://cookie-script.com/blog/cross-domain-cookie-consent#browser-related-restrictions-related-to-third-party-cookies
What should one do using Firebase UI?

Steps to reproduce:

Just try to run any Google SSO on safari. Once you get redirected you will not have any session. Cookies seem to be lost

Relevant Code:

const config: firebaseui.auth.Config = {
  signInOptions: [
    // {
    //   provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
    //   signInMethod: firebase.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD,
    //   requireDisplayName: false,
    // },
    firebase.auth.GoogleAuthProvider.PROVIDER_ID,
  ],
  tosUrl: () => {
    navigateTo(RouteNames.TERMS_OF_USE);
  },
  privacyPolicyUrl: () => {
    navigateTo(RouteNames.PRIVACY_POLICY);
  },
  siteName: 'site',
  callbacks: {
    signInSuccessWithAuthResult: () => {
      if (auth.currentUser) {
        login(auth.currentUser).catch((e) => {
          console.error(e);
          showErrorPopup('Something went wrong', 'Try log out and log in again.');
        });
      } else {
        showErrorPopup('Something went wrong', 'Please try again');
        console.error('no active user');
      }
      return false;
    },
    signInFailure(e): Promise<void> | void {
      console.error(e);
      showErrorPopup('Something went wrong', 'Please try again');
    },
  },
};
@Boardtale Boardtale changed the title Safari does not work - nor macos, nor ios Safari does not work on MacOS. It does not work at all on iOS devices - nor Chrome, nor Safari Feb 26, 2024
@Boardtale Boardtale changed the title Safari does not work on MacOS. It does not work at all on iOS devices - nor Chrome, nor Safari Safari does not work on MacOS. It does not work at all on iOS devices - nor Chrome, nor Safari in redirect mode. In popup it does not work on Safari iOS Feb 26, 2024
@Boardtale Boardtale changed the title Safari does not work on MacOS. It does not work at all on iOS devices - nor Chrome, nor Safari in redirect mode. In popup it does not work on Safari iOS Safari does not work on MacOS. It does not work at all on iOS devices - nor Chrome, nor Safari in redirect mode. Feb 26, 2024
@jhuleatt
Copy link
Collaborator

Let's use #1070 as the main issue to discuss this. I've posted #1070 (comment) there with a guide.

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

No branches or pull requests

2 participants