我正在使用 google 登录工作流程来获取 GoogleSignInAccount 对象。我想对我的 firebase 应用程序的 google 用户进行身份验证,这需要一个可以使用 requestIdToken(String serverClientId) 请求的 token 在构建我的谷歌客户端 api 时。我不确定要将什么作为我的 serverClientId?
最佳答案
要避免 java.lang.IllegalArgumentException: Must specify an idToken or an accessToken
,使用
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(googleClientId)
.requestEmail()
.build();
关于android - 构建 GoogleSignInOptions 时的 firebase serverClientId,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34283355/