Modify or disable Google Smart Lock behavior in Android apps

688 Views Asked by At

I added Firebase integration to my Android app and unexpectedly ended up also getting Google Smart Lock password management behavior for free.

Although I am reasonably happy with the behaviour, I'd like to modify it ever so slightly.

The unexpected behaviour: I have a login dialog that's used to provide credentials to SMB shares. Now that I have integrated Firebase, I end up with the following unexpected addtion to my login dialog box:

Unexpected Smart Lock prompt

What I'd like to modify: I'd like to constrain the login credentials to the target device (i.e. do not share userid/passwords across different SMB target devices), in the same way that Chrome does not reuse credentials across different web sites. (I think accidentally sending cached credentials to a machine they don't belong to constitutes a mild security risk). For the given example, I'd like Google Smart Lock to prompt ONLY for credentials for \lothlorien.

Entered credentials show up in my Smart Lock credential cache in my browser as being associated with my Android application.

Oddly, I didn't do anything explicitly to make this behavior appear, other than (1) add firebase integration, and (2) name the EditTexts in my activity. It's an Activity, not a dialog box, although it does use Material dialog themes.

If there were some easy way to associate them with credentials for "smb://lothlorien" (for example), I'd go for that.

Given that I already have functionality to cache and store credentials, and given the non-trivial nature of the Google Smart Lock apis, I'd be just as happy to disable the Smart Lock prompt altogether.

Either fix would work for me. Associate credentials with a specific machine; or disable the feature in the dialog box.

0

There are 0 best solutions below