Passage and the Passage Android SDK were built to make passkey authentication as fast, simple, and secure as possible. This example Android application is a great place to start. Before using Passage in your own Android app, you can use this example app to:
-
Login/Register with Passkeys: Experience secure and user-friendly passkey authentication.
-
Login/Register with One-Time Passcode (OTP): Implement OTP-based authentication for enhanced security.
-
Login/Register with Magic Link: Provide users with a seamless login experience using magic links.
-
Login/Register with Hosted Login: Utilize hosted login to handle authentication externally.
- Android Studio Electric Eel (or newer)
- Android device with Android 13+ installed and Google account setup
- A Passage account and app (you can register for a free account here)
- Completed registration of your Android app with Passage (view instructions here)
- NOTE: When setting up your
assetlinks.json
file, you'll need to addid.passage.example_android
to your target list OR change the package name of this example app to match your Android app's package name. (You can skip this step if you're using Hosted Login. Please refer to this page)
- NOTE: When setting up your
In the strings.xml file replaceYOUR_AUTH_ORIGIN
with your app’s Passage auth origin, respectively. Learn more about Passage app ids and auth origins here.
If you're using Hosted Login, you can get your YOUR_AUTH_ORIGIN
from here:
In "Native Apps" in Passage Console, you can get your app's associated domain. Use this value (minus the "https://") instead of YOUR_AUTH_ORIGIN in the next step below.
If all of the configuration was setup correctly, you should be able to run this application in the emulator or on a real device through Android Studio!