Skip to content

[firebase_auth]: UnimplementedError: signInWithPopup() is only supported on web based platforms #17333

@Kritopoulos

Description

@Kritopoulos

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

No response

Which platforms are affected?

No response

Description

While trying to FirebaseAuth.instance.signInWithPopup(GoogleAuthProvider()) I am facing this error on flutter web.
While I am running on localhost this functionality works properly. When i release the version to my site it stops working.
I have followed

index.html

<script type="module">
    // Import the functions you need from the SDKs you need
    import { initializeApp } from "https://www.gstatic.com/firebasejs/11.6.1/firebase-app.js";
    // TODO: Add SDKs for Firebase products that you want to use
    // https://firebase.google.com/docs/web/setup#available-libraries

    // Your web app's Firebase configuration
    const firebaseConfig = config from firebase console;

    // Initialize Firebase
    const app = initializeApp(firebaseConfig);
</script>

main.dart

 await Firebase.initializeApp(
        name: kIsWeb ? null : 'my_app',
        options: DefaultFirebaseOptions.currentPlatform,
      );

firebase console -> authentication -> settings -> authorized domains -> domain added

firebase_auth: ^5.5.3

Reproducing the issue

Trying to hit the button to sign in with google on production site.

Firebase Core version

3.13.0

Flutter Version

3.27.4

Relevant Log Output

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked: customer-responseWaiting for customer response, e.g. more information was requested.platform: webIssues / PRs which are specifically for web.plugin: authtype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions