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

iOS 'GoogleSignIn' pod - Select account screen does not show up again #357

Closed
bes opened this issue Mar 16, 2018 · 12 comments
Closed

iOS 'GoogleSignIn' pod - Select account screen does not show up again #357

bes opened this issue Mar 16, 2018 · 12 comments

Comments

@bes
Copy link

bes commented Mar 16, 2018

Step 1: Are you in the right place?

I believe I am in the right place, however there is a StackOverflow question tracking this as well (not written by me, but +1'd by me)

Step 2: Describe your environment

  • Device: iPad (iOS 10, 11), iPhone (iOS 10, 11), iOS iPhone emulator
  • OS version: iOS 10, 11
  • SDK version: iOS 11 SDK / pod 'GoogleSignIn', '= 4.1.2'

Step 3: Describe the problem:

After selecting a Google account once, the user cannot select an account again, unless the user goes into Safari and chooses to sign out (or add more accounts) there.

This issue persists regardless of if the user selects the Sign out or Disconnect button in the Sample (or for that matter in any app that uses the iOS GoogleSignIn SDK 4.1.2.

Steps to reproduce:

  1. Have an app that signs in using GoogleSignIn SDK, e.g. google-services/ios/signin of this repository (Objective-C version, but the same happens with Swift)
  2. Press sign in button
  3. The select google account web view is shown - select a user
  4. Sign out or disconnect, does not matter
  5. Sign in again
  6. =ERROR= The user is NOT prompted to select an account, but immediately signed in.

Observed Results:

As you can see from the video (captured with the latest current version of google-services/ios/signin from this repository), it is not possible to choose a user, once the choice has been made.

can_not_select_user

Expected Results:

After calling [[GIDSignIn sharedInstance] signOut]; or GIDSignIn.sharedInstance().signOut() the user should be able to select a new google account.

Relevant Code:

The code in this repository.

Thank you!

@DanSessions
Copy link

I'm also seeing this behaviour. Was it introduced in 4.1.0 with the use of SFAuthenticationSession?

@s9027059
Copy link

Have the same issue here with SDK v4.0.2 and v4.1.2, this caused user can't switch account within our App.

@s9027059
Copy link

Login process should redirect to a page with existed login account (if any) or Use another account options after tapped GIDSignInButton, but now that page is gone once you have signed in succeed.
There are 2 workarounds can bring that page back for now:

  1. Clear Website Data of Safari in settings
  2. Install another App need Google account and log in with new account (e.g. Gmail, Google drive...)

@cokodude
Copy link

Having the same issue on 4.1.1 and updating to 4.1.2 did not help.

A workaround of opening a logout page (https://accounts.google.com/Logout) from SFSafariViewController before signing in seems to work in iOS 10, but not iOS 11... possibly due to the SDK using SFAuthenticationSession. Will have to downgrade to 4.0.1 and see if workaround works for both iOS versions there.

@abhimuralidharan
Copy link

Facing the same issue. What is the fix? signout and disconnect does nothing. Any older versions of the sdk helps?

@netmaid
Copy link

netmaid commented Mar 26, 2018

I'm also facing this problem. Help me.

@cokodude
Copy link

cokodude commented Apr 2, 2018

The issue is not yet fixed for me on v4.1.2. If the user is logged in to only one account in Safari, the account selector is not presented and the SDK automatically signs in to the account that's logged in in Safari.

@aarsland
Copy link

aarsland commented Apr 9, 2018

Experiences the same behaviour - have tried v.4.0.0, 4.0.2, 4.1.1 and 4.1.2. Any workarounds?

Seems like it is related to setting of [GIDSignIn sharedInstance].serverClientID = XXXXXX. When I remove that setting, the select dialogue appear.

@s9027059
Copy link

New workaround here: SDK v4.0.1 + opening a logout page (https://accounts.google.com/Logout) from SFSafariViewController (@cokodude mentioned)

@MariaKulkova
Copy link

MariaKulkova commented Jun 25, 2018

There are many Authentication URI parameters. One of them is "prompt" which could have a "select_account" value. It helped me to resolve the same issue for Auth0-service Google integration. Maybe could be useful for your issue.
See docs here: https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters

@KrishnaChaitanyaAmjuri
Copy link

When the user logs out, if we call GIDSignIn.sharedInstance()?.signOut(). Next time, then the email selection screen will appear.

It works for us

@bes bes closed this as completed Jun 27, 2019
@acenspades
Copy link

Hello
I am getting the same results as explained above by OP.
I'm using [[GIDSignIn sharedInstance].signOut]; and [[GIDSignIn sharedInstance].disconnect].

I installed the Google SDK using Cocoapods but is there a way to tell which version of the Google SDK i have? I'm assuming Cocoapods installed the latest version. Supposedly, the latest version 5.0 fixed the logout issue.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants