For the complete documentation index, see llms.txt. You can also append .md to any page URL to get its markdown version.
Skip to main content
For the complete documentation index, see llms.txt.

For the complete documentation index, see llms.txt

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:

  1. Your app sets an OIDCConfiguration, which includes the issuer, client ID, redirect URI and scopes of your Signicat OIDC client.
  2. 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.
  3. The end-user authenticates with their chosen eID.
  4. 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.
  5. The SDK validates the redirect and exchanges the authorisation code and PKCE verifier for tokens.
  6. Optional: If you set persistSession to true, the SDK stores the session encrypted on the device.
  7. The SDK returns an OIDCSession to 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() and getUserInfo() refresh an expired access token.
  • Optional session persistence: By default, sessions are kept in memory only. Set persistSession to true to store sessions encrypted on the device and isolated for each issuer and client ID. When the app starts again, set the configuration and call getSession() 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:

Need help?

If you need help or want to report an issue, contact us by creating a support ticket in the Signicat Dashboard.