Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

[Android] [WebAuth] Rework authentication flow#1511

Merged
mattleibow merged 3 commits intomainfrom
dev/android-auth
Nov 11, 2020
Merged

[Android] [WebAuth] Rework authentication flow#1511
mattleibow merged 3 commits intomainfrom
dev/android-auth

Conversation

@mattleibow
Copy link
Copy Markdown
Member

@mattleibow mattleibow commented Nov 9, 2020

Description of Change

Rework the authentication flow to better support interruptions, either by the user or the actual process of authentication via 2FA.

The new flow makes use of 2 "intermediate" activities. The first one, WebAuthenticatorIntermediateActivity, represents the container for the actual authentication process and starts the custom tabs. This will then handle the interruptions. The second one, WebAuthenticatorCallbackActivity, represents the "authenticated" path. This activity will then re-launch the first activity, but this time with different flags. These new flags will close the custom tabs and then complete the flow.

Bugs Fixed

API Changes

None.

Behavioral Changes

None.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

- The 2FA process breaks the flow but opening a separate activity from a separate app. This results in the flow being interpreted as a cancellation.
- The new flow uses an intermediate activity to correctly process the results.
- Also converted the BindService into an async method.
- Fixes #1292
if (activity != null)
CheckAppActions(activity.Intent);

WebAuthenticator.OnResume(null);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This i no longer used as the main activity neve has to handle the authentication events. This is now done by the intermediate activity.

@mattleibow mattleibow added this to the 1.6.0 milestone Nov 9, 2020
@mattleibow mattleibow changed the title [Android] Rework authentication [Android] [WebAuth] Rework authentication flow Nov 10, 2020
Redth
Redth previously approved these changes Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

2 participants