Android Okta Integration

Monkton, Inc.

With Rebar, MFAKit and Okta support is integrated into the Rebar SDK automatically. All that needs to occur is adding:

  • build.gradle settings
  • build.gradle includes
  • Update Rebar Hub to change app security settings to use Okta

Detailed documentation on configuring Okta in the Rebar Hub can be found here

Okta Android Integration Checklist

  • Add URL redirect to the app build.gradle file

    In the build.gradle file, add the appAuthRedirectScheme value

  • Add Okta libraries to build.gradle file

    In the build.gradle file, add the implementation value to the dependencies

  • Update Rebar Hub App to use Okta

    Ensure that the Okta Id for the app is enabled in the Rebar Hub

Okta Configuration in App

Otka integration within Rebar apps is handled automatically. Okta is supported in both iOS and Android with Rebar. The configuration settings for Okta are pulled and configured automatically within the App via the Rebar Hub.

Integration into apps requires the following:

  1. iOS: Rebar for iOS requires the MFAKit framework and the OktaOidc.framework framework be integrated into the App. These frameworks should be configured as Embed & Sign
  2. Android: Rebar for Android requires the Okta Oidc frameworks be added to the app gradle files

For iOS please follow the iOS for Okta specific instructions.

For Android please follow the Android for Okta specific instructions.

Gradle File Changes

At the top level of the build.gradle file, add the android.defaultConfig.manifestPlaceholders with the following. This will allow Okta to remap to your project. Here you should include your package name as the appAuthRedirectScheme value.

android.defaultConfig.manifestPlaceholders = [
        "appAuthRedirectScheme": "{your-app-bundle-identifier}"
android {
dependencies {

Under the dependencies section, add the implementation for Okta with the latest version:

dependencies {
    // Okta
    implementation ''

TLS Pinning

Rebar will automatically integrate the TLS Pins for securing the TLS traffic to Okta.

Source Compatibility Options

Within Gradle, you must enable the source compile options. These will ensure that Okta works as intended:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

Failure to do so will generate an error that looks like:

2020-01-01 00:00:00.000 16511-16511/ E/AndroidRuntime: FATAL EXCEPTION: main
    Process:, PID: 16511
    java.lang.BootstrapMethodError: Exception from call site #45 bootstrap method
        at com.okta.oidc.clients.web.WebAuthClientImpl.registerCallback(
        at io.monkton.rebar.ui.authentication.OktaLoginActivity.onCreate(SourceFile:1188)