Android OIDC SKD enroll factor

Hi All,

Could somebody point me to a documentation of the Android OIDC SDK (GitHub - okta/okta-oidc-android: OIDC SDK for Android) on how to enroll and sms factor? During the login the AuthenticationResponse was MfaEnroll. So I displayed the factors the user can enroll and trying to figure out how to send up the phone number the user entered in case of the SMS MFA enrollment…

Would assume I need to use the FactorEnrollRequest
The factor enroll request is the following

    FactorEnrollRequest setStateToken(String stateToken);

    FactorType getFactorType();
    FactorEnrollRequest setFactorType(FactorType factorType);

    FactorProvider getProvider();
    FactorEnrollRequest setProvider(FactorProvider provider);

    FactorProfile getFactorProfile();
    FactorEnrollRequest setFactorProfile(FactorProfile factorProfile);

Thank you!

Hey @sannyo! I assume you are looking to implement a native sign in flow rather than okta-hosted (Chrome Custom Tabs)? Either way, I recommend taking a look at our sample app(s) here, and in particular the NativeSignInWithMFAFragment which outlines how to resolve MFA with SMS.

You are correct. It was the custom sign in.
Also had the sample app but that crashed while the iOS version was fine and asked for a phone number to enroll. Will need to ask my okta admin to setup the account again since now it just wants to do email verification. Regardless as far as I know the android sample app has no enrollment flow in it unfortunately. (enroll vs verify)

You’ll want to take a look at our auth based SDK, as the Android one is only designed to help with the OIDC flow (this is the same SDK that the sample Ty mentioned uses to handle the MFA prompt): https://github.com/okta/okta-auth-java