Skip to content

OAuth Store Step

OAuthStoreStep persists/rereads/erases the user credential data provided by the OAuthStep.

This step has to be executed after the successful initialization of the application store. This means that there is no secure store except the passcodePolicyStore in the onboarding flow before the execution of the SecureStoreStep.

Input Parameters

Mandatory input parameters:

  • Secure store – Properly initialized and opened application store implementation typically provided by the StoreManagerStep.

  • Context – Specifies the android context initiating the flow such as the caller Activity. This setting has to be provided on the initial FlowContext.

Output Parameters

The output of the step is always in the secure store.

Using OAuthStoreStep

  1. Set the Secure store in the flowContext.

  2. Initiate the step:

      OAuthStoreStep oauthStoreStep = new OAuthStoreStep();
  3. Specify the execute method's FlowActionHandler parameter's "onFailure" and "onSuccess" behavior:

     flowManagerService.execute(flow, flowContext, new FlowActionHandler() {
            public void onFailure(Throwable t) {
                //set the status, update the caller activity
            public void onSuccess(FlowContext result) {
                //set the status, update the caller activity
                //read the result

Behavior of OAuthStoreStep

For the onboard scenario, this step persists the OAuth token data in the application store.

For the restore scenario, this step makes available the persisted OAuth token for the OAuth authorization requests. During the execution of the step, no data is read from the application store. Only a reference to the store is set. During network communication, this reference is used by the foundation layer to restore the OAuth token.

For the reset scenario, the persisted token is deleted from the application store.

Last update: April 14, 2021