capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/firebase/
Apache License 2.0
392 stars 101 forks source link

Google login is not working #542

Closed TamilselvanMariyappan closed 7 months ago

TamilselvanMariyappan commented 9 months ago

Plugin(s)

Version

5.3.0

Platform(s)

Current behavior

Untitled

Expected behavior

"Once clicked, the login is not working fine."

Reproduction

https://github.com/TamilselvanMariyappan/capacitor-firebase-plugin-demo/tree/Offshore-Dev-Demo

Steps to reproduce

https://github.com/TamilselvanMariyappan/capacitor-firebase-plugin-demo/tree/Offshore-Dev-Demo

"@angular/fire": "17.0.0", "@capacitor-firebase/authentication": "5.3.0", "rxjs": "7.8.0",

Other information

No response

Capacitor doctor

ionic cap build ios

Before submitting

robingenz commented 9 months ago

Please share more information. What exactly is not working?

TamilselvanMariyappan commented 9 months ago

In iOS, when attempting to log in to the Google account, only a loading message is displayed. FYI: Our current branch is https://github.com/TamilselvanMariyappan/capacitor-firebase-plugin-demo/tree/Offshore-Dev-Demo.

image

SureshKumarToverto commented 9 months ago

The functionality works as expected on Android; we have validated it with fingerprints for the Firebase project as well. However, on iOS, we still encounter issues when trying to log in using Google.

robingenz commented 9 months ago

@TamilselvanMariyappan You did not follow the installation instructions correctly. You need to add the CapacitorFirebaseAuthentication/Google pod to your ios/app/Podfile file, see: https://github.com/capawesome-team/capacitor-firebase/blob/main/packages/authentication/docs/setup-google.md#ios

SureshKumarToverto commented 9 months ago

Thanks, But we got an error

Screenshot 2024-01-10 at 4 57 14 PM

Error [capacitor] ✖ Updating iOS native dependencies with pod install - failed! [capacitor] ✖ update ios - failed! [capacitor] [error] Analyzing dependencies [capacitor] [!] CocoaPods could not find compatible versions for pod "GoogleSignIn": [capacitor] In snapshot (Podfile.lock): [capacitor] GoogleSignIn (= 6.2.4, ~> 6.2.4) [capacitor]
[capacitor] In Podfile: [capacitor] CapacitorFirebaseAuthentication/Google (from ../../node_modules/@capacitor-firebase/authentication) was resolved to 5.3.0, which depends on [capacitor] GoogleSignIn (= 7.0.0) [capacitor]
[capacitor] CodetrixStudioCapacitorGoogleAuth (from ../../node_modules/@codetrix-studio/capacitor-google-auth) was resolved to 0.0.1, which depends on [capacitor] GoogleSignIn (~> 6.2.4) [capacitor]
[capacitor]
[capacitor] You have either: [capacitor] out-of-date source repos which you can update with pod repo update or with pod install --repo-update. [capacitor] changed the constraints of dependency GoogleSignIn inside your development pod CodetrixStudioCapacitorGoogleAuth. [capacitor] You should run pod update GoogleSignIn to apply changes you've made. [capacitor]
[ERROR] An error occurred while running subprocess capacitor. capacitor sync ios exited with exit code 1. Re-running this command with the --verbose flag may provide more information.

robingenz commented 9 months ago

I cannot find the changes in your reproduction example.

SureshKumarToverto commented 9 months ago

Can you please check now? I have committed the changes.

robingenz commented 9 months ago

You should only add the CapacitorFirebaseAuthentication/Google pod, not Firebase/Messaging and Firebase/Analytics. The two are already added by the plugins.

Regarding the error: Do what the error message says. Run pod install --repo-update in the ios/App folder.

SureshKumarToverto commented 9 months ago

Removed Firebase/Messaging and Firebase/Analytics in the Podfile, but I still encounter problems with IOS Google login. Could you please share a branch that works for both Google and Microsoft login on iOS? It would be more helpful for our current project. Thanks in advance.

robingenz commented 9 months ago

Just take a look at our Firebase Authentication demo app: https://github.com/robingenz/capacitor-firebase-authentication-demo

DevEdward666 commented 9 months ago

followed this solution and worked for me https://stackoverflow.com/questions/42197729/app-getting-crash-when-click-on-googlesignin-button-why

github-actions[bot] commented 7 months ago

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