SAP / gigya-android-sdk

SAP CDC (Gigya) android sdk for mobile
Apache License 2.0
19 stars 13 forks source link

Social login not working: Google/Facebook #44

Closed x-devel closed 1 year ago

x-devel commented 1 year ago

Hello everyone! I'm having a major issue when trying to use the social logins for Google and Facebook.

Apple social login is working, it seems that only the social listed under the "externalProviders" do not work.

I'll jump straight to the point: from my Gigya instance I call gigya.showScreenSet(...) and this correctly shows me the login/registration page (which is configured remotely). Whenever I try and click either the Google or Facebook social login nothing happens. I get no errors or callbacks whatsoever. When debugging (using version v7.0.0) I noticed that I correctly get into the login function of the GoogleProviderWrapper class but after the HostActivity.present(...) within the wrapper is called nothing happens; it just stays in loading forever. Also, by analizing network traffic I don't see anything going out or coming in, so I presume its a library issue. I have configured the library following the documentation https://sap.github.io/gigya-android-sdk/sdk-core/

I don't know if this could be helpful but I also tried performing manual social login (by using gigya.login(Provider.GOOGLE,...)) and this way the Google login screen is shown correctly and I can register the user successfully (proving that atleast Google Cloud is configured correctly).

I'm currently using the latest library version (v7.0.0) and the issue was presenting itself even with older versions.

josefgrunig commented 1 year ago

I had a lot of issues after upgrading to v.7.0.0.

First I had to make the GoogleProviderWrapper constructor public, or the reflection won't find it, second I had to disable minification on those classes or again it would not find the Wrappers failing silently on an endless waiting wheel.

Now I am in a state where in release sometimes it performs the log-in and sometimes it fails before showing the googles's account selection (always the endless wheel of the screenset), or right after selecting the google account (again on the waiting wheel). No debug in console at all.

Any clue on how we could solve this issue?

josefgrunig commented 1 year ago

@x-devel I suggest you to check what happens in the handleSignInResult method and see if you get an exception there. A common error is a wrong api-key or the app not signed with the keystore matching the SHA fingerprint. In this latter case you get a "DEVELOPER ERROR" by Google Sign in

josefgrunig commented 1 year ago

I had a lot of issues after upgrading to v.7.0.0.

First I had to make the GoogleProviderWrapper constructor public, or the reflection won't find it, second I had to disable minification on those classes or again it would not find the Wrappers failing silently on an endless waiting wheel.

Now I am in a state where in release sometimes it performs the log-in and sometimes it fails before showing the googles's account selection (always the endless wheel of the screenset), or right after selecting the google account (again on the waiting wheel). No debug in console at all.

Any clue on how we could solve this issue?

I found the issue and will open a separate bug here #46

x-devel commented 1 year ago

@x-devel I suggest you to check what happens in the handleSignInResult method and see if you get an exception there. A common error is a wrong api-key or the app not signed with the keystore matching the SHA fingerprint. In this latter case you get a "DEVELOPER ERROR" by Google Sign in

Hey thank you for your responses! Unfortunately by debugging the handleSigninResult function of the Google wrapper I don't see anything (neither normal behavior nor exceptions) because the code doesn't even reach that function

josefgrunig commented 1 year ago

I had a similar issue on the Google Wrapper only, when session was already established and the SDK did not a proper logout previously: it stays forever on the landing wheel after selecting the Google Social button. But that happens only after a successful Login and then performing a Logout (which does not call the logout on the Google Wrapper, see #46 ) Facebook login always worked on my side. Sorry but can't help more on this.

tal-mi commented 1 year ago

Fixed the issue. Will be deployed in the upcoming version (upcoming days).

tal-mi commented 1 year ago

Fixed in version 7.0.1