OIDC SDK for Android
The Signicat OIDC SDK for Android authenticates end-users in your Android app with a Signicat OIDC client, using the Authorisation Code Flow.
How it works
To learn about the SDK works in the context of a standard authentication flow, see the sections below.
Authentication flow steps
In a standard authentication flow with the SDK, the following steps are performed:
- Your app sets an
OIDCConfiguration, which includes the issuer, client ID, redirect URI and scopes of your Signicat OIDC client. - Your app calls
login(). The SDK reads the discovery document, then opens the authorisation request in a supported browser, using a Custom Tab when available. - The end-user authenticates with their chosen eID.
- The Signicat service redirects to your registered HTTPS redirect URI. Android delivers the redirect to the SDK in your app through a verified App Link.
- The SDK validates the redirect and exchanges the authorisation code and PKCE verifier for tokens.
- Optional: If you set
persistSessiontotrue, the SDK stores the session encrypted on the device. - The SDK returns an
OIDCSessionto your app, completing the login.
Authentication flow sequence diagram
In a standard authentication flow with the SDK, the following sequence diagram shows a successful login:
Sequence diagram showing a standard authentication flow with the SDK
Key characteristics
The Signicat OIDC SDK for Android has the following key characteristics:
- Built on AppAuth: The SDK uses AppAuth for Android for authorisation and the token lifecycle, following the RFC 8252 practices for native apps.
- PKCE by default: Authorisation requests use Proof Key for Code Exchange (PKCE). Your app does not need a client secret.
- System browser only: Authorisation opens in a supported browser, preferably in a Custom Tab. The SDK never uses a web view.
- Automatic token refresh:
getSession()andgetUserInfo()refresh an expired access token. - Optional session persistence: By default, sessions are kept in memory only. Set
persistSessiontotrueto store sessions encrypted on the device and isolated for each issuer and client ID. When the app starts again, set the configuration and callgetSession()to restore the session. - Kotlin and Java: Every operation has a callback-based method. Kotlin callers can use the coroutine equivalents instead.
- No Activity required: You obtain the client from the application context, so you can use the SDK from cross-platform frameworks such as React Native, Cordova, Capacitor and OutSystems.
Get started
Use the buttons below to set up the SDK in your project, use its core operations and run the demo app:
Support
If you encounter issues or need guidance on handling errors, use the following resources:
If you need help or want to report an issue, contact us by creating a support ticket in the Signicat Dashboard.