question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: signInWithGoogle() won't fire

See original GitHub issue

Plugin(s):

@capacitor-firebase/authentication”: “^0.1.1”

Platform(s):

iOS

Current behavior:

const res = await FirebaseAuthentication.signInWithGoogle(); does nothing when it’s ran and no error is logged either.
I have added what needs to be added for iOS unless the documentation is missing something.

Expected behavior:

when ran, it should pull up Googles authentication window

Related code:

async googleLogin() {

    try {

        if (this.platform.is('capacitor')) {

            const res = await FirebaseAuthentication.signInWithGoogle();

            const credential = new OAuthProvider('google.com').credential(res.credential);

            await signInWithCredential(this.auth, credential);

          }

    } catch (err) {
        console.log(err);
    }
}

Other information:

Capacitor doctor:

Latest Dependencies:

  @capacitor/cli: 3.4.3
  @capacitor/core: 3.4.3
  @capacitor/android: 3.4.3
  @capacitor/ios: 3.4.3

Installed Dependencies:

  @capacitor/android: 3.4.3
  @capacitor/cli: 3.4.3
  @capacitor/core: 3.4.3
  @capacitor/ios: 3.4.3

[success] iOS looking great! 👌
[success] Android looking great! 👌

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lincolnthreecommented, Apr 5, 2022

Okay, so I have figured one thing out.

Running npx cap update removes the following lines from the Podfile if you put them in the wrong place:

  pod 'CapacitorFirebaseAuthentication/Facebook', :path => '../../node_modules/@capacitor-firebase/authentication'
  pod 'CapacitorFirebaseAuthentication/Google', :path => '../../node_modules/@capacitor-firebase/authentication'

These must be put in the target 'App' do section, as documented, but it’s easy to miss that. Fixing this resolved my issue.

0reactions
github-actions[bot]commented, May 6, 2022

It looks like there hasn’t been a reply in 30 days, so I’m closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dart - Can't fix it: signInWithGoogle isn't defined for the class ...
The method 'signInWithGoogle' isn't defined for the class 'FirebaseAuth'. I have tried to change versions of pubspec.yaml file but it is not ...
Read more >
[google_sign_in] The sign in plugin doesn't fire ... - GitHub
Run flutter create bug . Listen to Firebase Auth onAuthChanged; Sign in with Google; Refresh the page; Try to sign in with Google...
Read more >
Authenticate Using Google with JavaScript - Firebase
You can let your users authenticate with Firebase using their Google Accounts. You can either use the Firebase SDK to carry out the...
Read more >
Google Sign-In & Firebase Authentication Using Flutter
We will start by creating a new Flutter project with the latest version ... The signInWithGoogle() method that we have defined will help...
Read more >
How to Fix Sign-In Errors for Google Play on Amazon Kindle Fire
This typically happens after installing a Fire OS update. Error message on Amazon Kindle Fire/Google Play Store. The issue may also present in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found