capacitor-firebase icon indicating copy to clipboard operation
capacitor-firebase copied to clipboard

bug: signInWithGoogle

Open DeveloperAdam-github opened this issue 3 years ago • 10 comments

Plugin(s):

"@capacitor-firebase/app": "^1.0.0", "@capacitor-firebase/authentication": "^1.0.0",

Platform(s):

iOS

Current behavior:

When trying to signInWithGoogle the function runs but no pop up occurs and no data is being returned. To Native -> FirebaseAuthentication signInWithGoogle 60979170 is the message I get in the logs.

Expected behavior:

Assume a pop up should come up and ask me to sign in with google have tried same code and another plugin all works but wanted to use this plugin.

Steps to reproduce:

Install, setup the signInWithGoogle function and nothing happens

Related code:

const result = await FirebaseAuthentication.signInWithGoogle();

Other information:

Capacitor doctor:

💊   Capacitor Doctor  💊 

Latest Dependencies:

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

Installed Dependencies:

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

[success] iOS looking great! 👌

DeveloperAdam-github avatar Aug 27 '22 11:08 DeveloperAdam-github

Screenshot 2022-08-27 at 13 01 34

This is a console log from Safari about this issue.

DeveloperAdam-github avatar Aug 27 '22 12:08 DeveloperAdam-github

Did you add 'google.com' to the configuration providers array and run 'npx cap sync'?

robingenz avatar Aug 27 '22 13:08 robingenz

Yes and have added the url value from the GoogleService-Info

Also just to help with information singing in with email and password works okay, it's just the google authentication on iOS works on web.

DeveloperAdam-github avatar Aug 27 '22 13:08 DeveloperAdam-github

Did you add the CapacitorFirebaseAuthentication/Google pod to your Podfile (usually ios/App/Podfile)?

robingenz avatar Aug 27 '22 15:08 robingenz

Yep followed setup instructions and added that.

DeveloperAdam-github avatar Aug 27 '22 15:08 DeveloperAdam-github

Okay, please provide a minimal, reproducible example so I can debug the issue.

robingenz avatar Aug 27 '22 16:08 robingenz

@DeveloperAdam-github It's likely a different issue but I was having the same behavior and it was because I put the pod 'CapacitorFirebaseAuthentication/Google', :path => '../../node_modules/@capacitor-firebase/authentication' under def capacitor_pods and not under target 'App' do\ncapacitor_pods in Podfile. Took me a couple hours to figure that out so posting just in case that's your issue as well.

corcorb avatar Sep 12 '22 19:09 corcorb

@corcorb I confirm that this is now working, however where in the doc is it mentioned that we have to set it this way?

target 'App' do
  capacitor_pods
  # Add your Pods here
  pod 'CapacitorFirebaseAuthentication/Google', :path => '../../node_modules/@capacitor-firebase/authentication'
end

ngarel avatar Sep 20 '22 06:09 ngarel

@ngarel See https://github.com/capawesome-team/capacitor-firebase/blob/main/packages/authentication/docs/setup-google.md#ios

robingenz avatar Sep 20 '22 06:09 robingenz

Right...for some reason I was seeing: pod 'CapacitorFirebaseAuthentication', :path => '../../node_modules/@capacitor-firebase/authentication' which was already there...Didn't read it properly even though i visited this page a dozen times...

Thanks!

ngarel avatar Sep 20 '22 07:09 ngarel

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

github-actions[bot] avatar Oct 21 '22 01:10 github-actions[bot]