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

Google SignIn Fails with code 10 (on Android) #579

Open
tangxianqiang opened this issue Jun 14, 2023 · 4 comments
Open

Google SignIn Fails with code 10 (on Android) #579

tangxianqiang opened this issue Jun 14, 2023 · 4 comments

Comments

@tangxianqiang
Copy link

Device: Pixel 3xl
OS version: Android 12
SDK version:33
[Android] Google Play Services version:4.3.15

Describe the problem:
google SignIn always return error code 10 in these days on my release version. (debug apk is ok)
SHA1 all the same on google play console test, google cloud and firebase ( SHA1 come from release.jks)

package name is the same too
GOOGLE_LOGIN_CLIENT_ID is the right,copy from google Oauth

Steps to reproduce:

  1. click login
  2. select a user

Observed Results:

return error code 10, no more other information

Expected Results:

login success

Relevant Code:

val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
          .requestIdToken(GOOGLE_LOGIN_CLIENT_ID)
          .requestScopes(Scope(Scopes.EMAIL))
          .requestId()
          .build()
@tangxianqiang
Copy link
Author

it will return error 10 If the requestIdToken of web client id is fill wrong. Is it right?

@luoyiee
Copy link

luoyiee commented Aug 2, 2023

如果Web客户端id的requestIdToken填写错误,会返回错误10。这样对吗?

firebase中的web client id需要正确配置,不仅仅是Sha1的问题

@tangxianqiang
Copy link
Author

如果Web客户端id的requestIdToken填写错误,会返回错误10。这样对吗?

firebase中的web client id需要正确配置,不仅仅是Sha1的问题

使用debug版本,google 一键登录没有问题,说明web client id 使用是对的。现在是release的apk,无法登录,报10,我认为我配置的release的SHA1 肯定是对的,控制台打印、play console,cloud 都是对应上的

@luoyiee
Copy link

luoyiee commented Sep 14, 2023

你发的代码是旧的登录方式,旧模式我这里是配置了firebase--Authentication中的sha1和web_server_id,如果不配置我这里是会报10的 。 新方式一键登录可能不需要配置firebase就能成功,release和debug在我这里没区别

企业微信截图_1694680355431

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

2 participants