Google Sign in doesn't return any result when 'Use another account' to sign in

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 16:37:13

UPDATE: This bug has now been fixed in the Oauth2 Library


So I ran into the same issue as well. What I have found is that this is an open issue reported back in March. So this is probably not an issue with your code.

I found another stackoverflow question about the difference between Oauth2 and googleAuthUtil, using the other library mentioned, I have found that this bug doesn't exist.

I imported this package into my gradle

implementation('com.google.api-client:google-api-client-android:1.23.0') {
    exclude group: 'org.apache.httpcomponents'
}

and authenticate off of the GoogleAccountCredential object.

    GoogleAccountCredential credential = new GoogleAccountCredential(context, scope);
    startActivityForResult(credential.newChooseAccountIntent(), resultCode);

You need GET_ACCOUNTS permission for this method.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!