OpenPass SDK for Android overview
For quick and easy integration of OpenPass with your website, use the OpenPass SDK for Android. It works with Android-based mobile or TV apps, and you can choose to have the OpenPass sign-in as a standalone option or include it with other SSO providers like Google or Facebook.
For details on integrating your OpenPass implementation with UID2, contact your Technical Account Manager at The Trade Desk.
Minimum requirements
API 19 (KitKat)
Releases
Here's a table for finding the latest releases and updates.
| Type | Location |
|---|---|
| Latest release | Maven Central repository implementation("com.myopenpass.sdk:openpass-android-sdk:<LATEST_VERSION_NUMBER_PLACEHOLDER>") |
| Snapshots builds | Nexus Repository Manager repository |
| Latest details | Changelog in GitHub. |
Authentication flow
IMPORTANT: Be sure to provide a list of redirect URIs when setting up your account. This is required for the flow to work properly.
This SDK enables users to use SSO for authenticating their identity on your site or app. Choosing a flow is an important part of it.
Initialize the OpenPass manager using an Android Context or custom network session.
Choose a flow for signing in:
- Web flow: A web-based flow that uses a custom Chrome tab to perform sign-in before redirecting the user to the application.
- Device authorization flow: Provides the user a code that allows them to use another device, like a smartphone, to complete the steps for authentication before returning to the application.
TIP: When displaying the user code and verification URI, The Trade Desk recommends generating a QR code for the user. This makes it easier for them to navigate to the linked website through their mobile device or computer.
Web flow
The web-based flow uses the Android Custom Tabs feature to launch the sign-in experience in a custom tab. After the user completes their sign-in, the web component redirects the user back to the application.
Setting up the flow requires configuring the web sign-in flow client, intent, and redirect.
The following is a screenshot of the OpenPass sign-in page redirected from the Android app.
Device authorization flow
To improve the user experience, smart TVs and similar input-constrained devices ask the user to go to a link on their computer or smartphone to enter a code for authorizing the device.
The following table shows the two options available for the device authorization flow:
| Flow | Description | Screenshot |
|---|---|---|
| TV sign-in flow client | A simple, optimized flow that delegates the user experience to the OpenPass SDK. You should use this option because it does a lot of the work for you, including launching its own activity and presenting the user experience. | |
| Device authorization flow client | A flow that enables the developer to create their own user experience powered by OpenPass. |
Documentation
SDK documentation includes the following guides:
- Android quickstart guide
- Fire TV quickstart guide
- Reference guide
- Sample App
To make the user experience consistent and enjoyable, we also provided you with OpenPass Integration best practices and co-branding guidelines. The latter includes a ZIP file with SVG logos and other web assets.