Auth0 Dashboard Configuration
Go to your application settings and click Show Advanced Settings at the bottom of the page. Then in the “Device Settings” tab, you will need to provide both the Android Application’s Package Name and certificate Key Hash.- App Package Name: This is the package name, as declared in the app’s manifest. It’s also available in the
app/build.gradle
file as theapplicationId
attribute. If both values are not the same, use the one for theapplicationId
. An example would becom.example.android.myapp
- Key Hashes: These are the SHA256 fingerprints of our Android app’s signing certificates. You can include multiple of them by separating them with commas. Both the release and debug keystore fingerprints can be specified here. The section below explains how to obtain them. An example would be
DE:1A:5B:75:27:AA:48:D5:A6:72:2F:76:43:95:9B:79:C6:86:1A:5B:75:27:AA:48:D5:A6:73:FE
.
Getting your Signing Certificates Fingerprint
Use the following command to generate the fingerprint via the Java keytool CLI:keytool -list -v -keystore my-release-key.keystore
or obtain the default debug key:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
The value required by the dashboard is the one listed as “SHA256”. You can read more about Keystores in this official article.
Enable the Email Connection
Passwordless using Magic Link works only with the passwordless connection of type “email”. Go to Dashboard > Authentication for Passwordless connections and click on Email. A popup will open and the HTML + Liquid email template will become editable. Verify that the body contains a conditional like this:Configuring the SDK
Now that the Auth0 application is configured follow the instructions and set up PasswordlessLock withLock.Android
as seen in the passwordless docs.
SDK usage
Lock Passwordless authenticates users by sending them an Email with a one-time password, which in this case will be a LINK instead of a code. If you have followed the guide for Passwordless classic, you’d only need to remove theuseCode()
call and replace it with useLink()
.
Finally, launch the PasswordlessLock
widget from inside your activity.