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

Google login is not working #542

Closed
5 of 16 tasks
TamilselvanMariyappan opened this issue Jan 8, 2024 · 12 comments
Closed
5 of 16 tasks

Google login is not working #542

TamilselvanMariyappan opened this issue Jan 8, 2024 · 12 comments

Comments

@TamilselvanMariyappan
Copy link
Contributor

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Version

5.3.0

Platform(s)

  • Android
  • iOS
  • Web

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

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@TamilselvanMariyappan TamilselvanMariyappan added bug/fix Something isn't working needs: triage labels Jan 8, 2024
@robingenz
Copy link
Member

Please share more information. What exactly is not working?

@TamilselvanMariyappan
Copy link
Contributor Author

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
Copy link

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
Copy link
Member

@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
Copy link

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
Copy link
Member

I cannot find the changes in your reproduction example.

@SureshKumarToverto
Copy link

SureshKumarToverto commented Jan 10, 2024

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

@robingenz
Copy link
Member

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
Copy link

SureshKumarToverto commented Jan 10, 2024

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
Copy link
Member

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

@DevEdward666
Copy link

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

Copy link
Contributor

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants