googlesamples / google-services

A collection of quickstart samples demonstrating the Google APIs for Android and iOS
https://developers.google.com
Apache License 2.0
3.06k stars 2.53k forks source link

Android sign in problem. Processing icon keep moving for long time at Consent dialog #421

Open AlexeyMatrosov opened 5 years ago

AlexeyMatrosov commented 5 years ago

We use google drive integration in our application. But some of our customers have a problem with sign in.

Video: https://youtu.be/cpULeN52RN8

My code is really simple:

GoogleSignInOptions signInOptions =
                new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                        .requestEmail()
                        .requestScopes(new Scope(DriveScopes.DRIVE_FILE), new Scope(DriveScopes.DRIVE))
                        .build();

        client = GoogleSignIn.getClient(requester.getRequesterContext(), signInOptions);
        requester.getRequesterActivity().startActivityForResult(client.getSignInIntent(), REQUEST_LOGIN)

OAuth consent screen is okay too. For most users everything works. But not for all =(

TomTietze commented 5 years ago

Hey,

I had the same issue with the Google Fit connection in my app. This problem occurs for all users with a "googlemail" domain. If the user change from "googlemail" to "gmail" domain, the problem has solved. So for some reason the Google-Sign-In-Api does not support accounts with a "googlemail" domain any more. Unfortunately I have not found any other solution to the problem yet. Somehow, it's related to requesting the scopes. If you remove the "requestScopes(...)" line, it it works too.

Tom

AlexeyMatrosov commented 5 years ago

Thanks Tom!

Looks like we have same problem too. You save many days of searching for problems. I reported this problem to google issue tracker.

I hope they will fix it :)

dknchris commented 4 years ago

@TomTietze Thank you so much for this information. I have the exact same issue with 'googlemail' domain users when they try to connect my app to their Google Drive.