【发布时间】:2014-02-11 05:35:26
【问题描述】:
在我的 Android 应用程序中,我正在尝试获取 google 令牌以在我的 google 应用引擎后端服务器上进行验证。但我总是得到这个例外:
com.google.android.gms.auth.GoogleAuthException: getToken(Unknown Source) exception
我的代码:
private Account mAccount = AccountManager.get(this).getAccountsByType(GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE)[0];
private static final String SCOPE = "audience:server:client_id:" +Constants.WED_CLIENT_ID;
String token = GoogleAuthUtil.getToken(LoginActivity.this, mAccount.name, SCOPE);
我已经尝试过 Stackoverflow 中提出的所有解决方案。
【问题讨论】:
标签: android google-app-engine google-authentication