Skip to content

Smart Lock does not retrieve saved Facebook credential #171

Closed
@wuman

Description

@wuman

The current implementation (as of commit c9962e7) uses the CredentialsAPI class to request for saved credentials in Smart Lock. However, it does not appear to retrieve any other account types other than Google. The end result is that a saved Facebook credential cannot be retrieved for further auto sign-in.

This can seemingly be fixed by requiring the CredentialsAPI class depend on a list of account types and then requesting for the credentials of those account types in CredentialsAPI#requestCredentials():

public void requestCredentials(final boolean shouldResolve, boolean onlyPasswords) {
    CredentialRequest.Builder crBuilder = new CredentialRequest.Builder().setPasswordLoginSupported(true);

    if (!onlyPasswords) {
        crBuilder.setAccountTypes(IdentityProviders.GOOGLE, IdentityProviders.FACEBOOK);
    }

    ...
}

I'd love to send a pull request for this patch, but would like to first raise it here to see if there is a reasoning behind retrieving only the Google account type that I have overlooked in the grand scheme of things.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions