小编son*_*eff的帖子

7
推荐指数
1
解决办法
1491
查看次数

Google 一键登录/注册,访问个人数据

我刚刚开始在我的新应用程序中使用谷歌点击登录/注册。它工作得很好,只是我不知道如何请求用户权限来访问范围数据?

client.verifyIdToken(
    token,
    CLIENT_ID,
    function(e, login) {
      var payload = login.getPayload(); // <-- payload just containt name,email and picture. I want more
      var userid = payload['sub']; 
    });
Run Code Online (Sandbox Code Playgroud)

javascript oauth-2.0 google-oauth google-smartlockpasswords google-identity

5
推荐指数
1
解决办法
2574
查看次数

未调用 Android Smart Lock setResultCallback

我一直在关注https://developers.google.com/identity/smartlock-passwords/android/retrieve-credentials以尝试自动登录用户,如果他们已将凭据保存到 chrome 中的新 Android Smart Lock 功能。我完全遵循了指南,但是我传递给 setResultCallback() 的回调没有被调用。有没有人遇到过这个问题?

没有错误消息或任何东西,只是没有被调用。

android credentials google-play-services google-smartlockpasswords

4
推荐指数
1
解决办法
1694
查看次数

Google Smart Lock for Passwords - 应用程序是否可以看到联合凭据密码?(例如,保存用户的 Facebook 或 Google 登录操作时)

我想知道这里是否存在安全问题?任何使用 google 智能锁的应用程序都会知道用户的 google、twitter 等帐户凭据,对吗?看看这个谷歌教程here,在credentialsRetrieved回调中,Credential对象具有应用程序可以访问的用户用户名和密码。但是现在应用程序知道用户的 google 或 twitter 帐户?这是我正在谈论的代码:

 private void onCredentialRetrieved(Credential credential) {
    String accountType = credential.getAccountType();
    if (accountType == null) {
        // Sign the user in with information from the Credential. 
//right here we have the users login credentials, dont we ??  There exposed. 
        signInWithPassword(credential.getId(), credential.getPassword());
    } else if (accountType.equals(IdentityProviders.GOOGLE)) {
        // The user has previously signed in with Google Sign-In. Silently
        // sign in the user with the same ID.
        // See https://developers.google.com/identity/sign-in/android/
        GoogleSignInOptions gso …
Run Code Online (Sandbox Code Playgroud)

android google-smartlockpasswords

2
推荐指数
1
解决办法
1448
查看次数

关联网站的密码未通过 Smart Lock API 在应用中检索

我已将我的 https 网站和应用程序关联以共享存储的凭据,并收到关联已生效的确认,但是当我CredentialsApi.request()在我的应用程序中调用该方法时,我无法从我的网站检索任何使用 Chrome 密码保存的凭据经理。我怎样才能解决这个问题?

android google-chrome google-smartlockpasswords

1
推荐指数
1
解决办法
799
查看次数

Smart Lock 显示不是来自我的应用程序的帐户

我正在我的应用程序上实施谷歌智能锁,目前,我们只在应用程序端实施,一旦用户允许保存凭据,例如在重新安装时自动登录。但是,当我从 password.google.com 中删除密码时,或者当我在 Google 帐户没有为该应用程序存储凭据的设备上运行该应用程序时,库会显示一个对话框,建议其他网站和应用程序电子邮件。我需要禁用此行为,我只想建议凭据和电子邮件(如果它们属于我的应用程序)。

我正在使用以下代码请求凭据:

    private void requestCredentials() {
            CredentialRequest request = new CredentialRequest.Builder()
                   .setPasswordLoginSupported(true)
                   .setIdTokenRequested(true)
                   .build();
            mProgressSmartLock.show();
    credentialsClient.request(request).addOnCompleteListener(credentialsApiRequestCompleteListener());
    }
Run Code Online (Sandbox Code Playgroud)

和听众:

    public OnCompleteListener<CredentialRequestResponse> credentialsApiRequestCompleteListener(){
            return new OnCompleteListener<CredentialRequestResponse>() {
                @Override
                public void onComplete(@NonNull Task<CredentialRequestResponse> task) {
                // Successfully read the credential without any user interaction, this
                // means there was only a single credential and the user has auto
                // sign-in enabled.
                mProgressSmartLock.dismiss();
                if (task.isSuccessful()) {
                    processRetrievedCredential(task.getResult().getCredential());
                    return;
                }

                    // This is most likely the case where the user has …
Run Code Online (Sandbox Code Playgroud)

android google-play-services google-smartlockpasswords google-play-services-3.3.0 play-services-auth-base-license

1
推荐指数
1
解决办法
1073
查看次数