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

Supported browsers

The SDK opens the authorisation request in a browser installed on the device. By default, it opens only the browsers that Signicat has verified to complete every authentication flow, including app-to-app flows.

The browser it chooses depends on the following conditions:

Default supported browsers​

The SDK supports the following browsers by default:

  • Chrome: com.android.chrome
  • Samsung Internet: com.sec.android.app.sbrowser
  • Firefox: org.mozilla.firefox
  • Microsoft Edge: com.microsoft.emmx
  • Brave: com.brave.browser
  • Vivaldi: com.vivaldi.browser

The SDK also verifies that each of these browsers is signed with its publisher's certificate, so an app that reuses one of these package names is not opened.

Confirmation prompt in Firefox and Microsoft Edge

Firefox and Microsoft Edge ask the end-user to confirm before they return to your app.

Known unsupported browsers​

The following browsers fail some authentication flows, so the SDK does not support them by default:

  • Opera, Opera Mini and Opera GX: These browsers lack Custom Tabs support, and they open the redirect App Link in your app only when the end-user chooses to do so from the browser's settings.
  • UC Browser: This browser lacks Custom Tabs support, and it opens the redirect App Link in your app only when the end-user chooses to do so from the browser's settings.
  • DuckDuckGo: This browser doesn't open App Links in your app during redirects, so app-to-app flows, such as DigiD app-to-app, do not complete.

Support other browsers​

To choose which browsers the SDK may open, set browserMatcher on the client before you call login(). A BrowserMatcher receives a BrowserDescriptor for each browser that the SDK considers, and returns whether the SDK may open that browser:

Example: Choose the browsers to accept
// Accept only Chrome and Samsung Internet, when signed by their publishers
val allowedBrowsers = mapOf(
"com.android.chrome" to setOf("7fmduHKTdHHrlMvldlEqAIlSfii1tl35bxj1OXN5Ve8c4lU6URVu4xtSHc3BVZxS6WWJnxMDhIfQN0N0K2NDJg=="),
"com.sec.android.app.sbrowser" to setOf("ABi2fbt8vkzj7SJ8aD5jc4xJFTDFntdkMrYXL3itsvqY1QIw-dZozdop5rgKNxjbrQAd5nntAGpgh9w84O1Xgg=="),
)
client.browserMatcher = BrowserMatcher { browser ->
allowedBrowsers[browser.packageName] == browser.signatureHashes
}

// Accept every browser except Opera. Note: This matcher does not verify publisher signatures.
client.browserMatcher = BrowserMatcher { browser -> browser.packageName != "com.opera.browser" }

// Accept the default supported browsers, and Chrome Beta 140 or later when signed by its publisher.
// To get <CHROME_BETA_SIGNATURE_HASH>, see "Find the signature hash of a browser".
client.browserMatcher = BrowserMatcher { browser ->
BrowserMatcher.DEFAULT_SUPPORTED_BROWSERS.matches(browser) ||
(browser.packageName == "com.chrome.beta" &&
browser.signatureHashes == setOf("<CHROME_BETA_SIGNATURE_HASH>") &&
(browser.version?.substringBefore('.')?.toIntOrNull() ?: 0) >= 140)
}
Monitor the browsers of your end-users

Your matcher can report the packageName, version and signatureHashes of the browsers it receives. This can help you identify which browsers and versions cause problems and whether they are signed by their publishers. For example, you can send this information to your analytics if your privacy policy allows it.

The SDK can call your matcher several times during one login. For example, it may call the matcher again when an app-to-app flow resumes. It stops as soon as it finds an accepted browser.

The SDK can call your matcher from a background thread or from the thread that calls createOidcCustomTabsIntent(). If you report browsers to your analytics, avoid reporting the same browser more than once. Make this reporting code thread-safe.

Example: Report each browser once
val reported = ConcurrentHashMap.newKeySet<String>()
client.browserMatcher = BrowserMatcher { browser ->
val signatureHashes = browser.signatureHashes.joinToString(",")
if (reported.add("${browser.packageName}:${browser.version}:$signatureHashes")) {
analytics.log("browser_seen", browser.packageName, browser.version, signatureHashes)
}
BrowserMatcher.DEFAULT_SUPPORTED_BROWSERS.matches(browser)
}

For an overview of the available matchers, see the table below:

A browser that supports Custom Tabs can be passed to your matcher twice: first for its Custom Tab, and then for the standalone browser app.

For an overview of the BrowserDescriptor properties, see the table below:

Find the signature hash of a browser​

To accept a browser only when its publisher signed it, you need its signatureHashes. To log them, temporarily set a matcher in a debug build of your app that logs every browser and accepts none:

Example: Log every browser and accept none
if (BuildConfig.DEBUG) {
client.browserMatcher = BrowserMatcher { browser ->
Log.d("BrowserMatcher", browser.toString())
false
}
}

To find the hash:

  1. On a test device, install the browser.
  2. In your debug build, call login(). The matcher rejects all browsers, so the SDK passes every installed browser to it. Once all browsers have been rejected, login() fails with noSupportedBrowser.
  3. In Logcat, copy the hash of the browser.
  4. In your debug build, remove the matcher.
Hashes may depend on the distribution channel

A browser that you install from another app store or as a sideloaded APK can be signed with a different certificate than the Google Play release. If so, then they will also have a different hash.

When no supported browser is installed​

When browserMatcher accepts none of the installed browsers, login() fails with the noSupportedBrowser error code and no browser opens.

In this case, ask the end-user to install or enable a supported browser, and then to try again.

Want to learn more?

To learn how to respond to error codes, see the Error handling page.