- Mastering Firebase for Android Development
- Ashok Kumar S
- 145字
- 2021-06-18 18:49:18
Smart Lock
Up until now, the illustration application has not made use of Smart Lock for Passwords. Smart Lock is the technology behind the Google Chrome browser feature that saves login and password data for the sites used by a client. This feature, when enabled, is also accessible to Android applications utilizing Firebase verification. Smart Lock for Passwords provides the verification framework to exhibit a rundown of the list of credentials saved on the device beforehand by the client utilizing Smart Lock. The client just chooses a formerly saved identity to sign in to or accept access to the application. Smart Lock is enabled when calling the createSignInIntentBuilder() method on the AuthUI instance as shown here:
private void authenticateUser() {
startActivityForResult(
AuthUI.getInstance().createSignInIntentBuilder()
.setAvailableProviders(getProviderList())
.setIsSmartLockEnabled(true)
.build(),
REQUEST_CODE);
}
This code helps AuthUI to remember the identities used for signing in to the application.