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

App-to-app flow

Some identity providers authenticate the end-user in their own mobile app rather than on a web page. This is known as an app-to-app flow.

How it works​

The SDK manages OIDC authentication through the following steps:

  1. Your app requests the identity provider's app through the acrValues property of your OIDCConfiguration. For details, see the Configuration reference section on the Android Set up the SDK page.
  2. Your app calls login(), and the SDK starts the OIDC flow.
  3. The identity provider's app opens and authenticates the end-user.
  4. The identity provider's app returns to your app through an App Link, with the authentication result.
  5. Your app validates that link and resumes the OIDC flow by sending the result to Signicat.
  6. Signicat redirects to your registered redirect URI, and the SDK completes the flow and returns a session.

Your app must handle steps 4 and 5. The identity provider's return link arrives on your domain and is received by an Activity in your app, so the SDK does not receive it directly.

Resume the authentication flow​

The SDK's createOidcCustomTabsIntent(context) helper returns a CustomTabsIntent from AndroidX Browser. The SDK only includes AndroidX Browser at runtime, so you need to add it as a dependency in your app module's build file:

Example: Add AndroidX Browser as a dependency in build.gradle.kts
dependencies {
implementation("androidx.browser:browser:1.10.0")
}

To resume authentication in step 5, use createOidcCustomTabsIntent(context) to build the browser request. The helper applies the same browser behaviour as login() and selects the browser using the client's browserMatcher. Authentication can then continue in the browser session that started it.

Example: Resume authentication in the same browser session
createOidcCustomTabsIntent(this).launchUrl(this, resumeUri)
No supported browser

If browserMatcher accepts none of the installed browsers, the helper throws a SignicatOIDCException with the noSupportedBrowser error code.

For details, see Supported browsers.

What your app needs​

To support an app-to-app flow, your app needs to meet the requirements described in the following three sections:

You need to declare an Activity to receive the return link in AndroidManifest.xml, with an intent filter for the return host and path.

The return link is separate from your OIDC redirect URI. You need to ensure that its domain lists your application ID and signing certificate fingerprint in its Digital Asset Links file.

Want to learn more?

To learn more, see the Verify your domain section in the Android Set up the SDK page.

Treat the return link as untrusted input because it comes from outside your app. At a minimum, you must:

  • Accept only the exact host and path you registered, over HTTPS.
  • Reject links with unexpected query parameters.
  • Handle the case where the identity provider returns an error instead of a result.
  • Reject links that fail any check. Do not forward them.

Demo app example​

The demo app includes examples of complete app-to-app flows so that you can test them and see how they work. These flows include the following:

  • OIDC configuration.
  • Activity that receives and validates the return link.
  • Code that resumes the flow.
  • Manifest declarations.

You can use the examples as a model for how to implement your own app-to-app flow, but you must check the documentation of the identity provider that you want to integrate with in addition to the SDK documentation.

This is because each identity method defines its own return link format and its own way of resuming the flow.

To learn more, see the following links: