Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix android web authentication #126

Merged
merged 2 commits into from
Jan 31, 2018
Merged

Fix android web authentication #126

merged 2 commits into from
Jan 31, 2018

Conversation

lbalmaceda
Copy link
Contributor

@lbalmaceda lbalmaceda commented Jan 29, 2018

I want to clarify how each flow works:

CustomTabs are meant to be open within the app. The NEW_TASK flag should not be used on that case. Of course I wasn't aware of this behavior until we required to pause the activity to get some data from an external app, like gmail.

For the Browser intent logic, which is only used in the case of calling showUrl from a non-activity class, the NEW_TASK flag is required as the context used is the Application one instead of the Activity one. If this flag is not provided a runtime exception raises. Browser is "still used" when going through the CustomTabs logic and no CustomTabs compatible browser app is installed in the device.

The NO_HISTORY flag introduced in a previous commit to avoid leaving the browser app in the "recents app" view doesn't work as expected. Instead, it's making the custom tab or browser session refresh the webpage on the activity resume. I've removed both flags and might be worth checking this sdk line as well.

This fixes #124

@lbalmaceda lbalmaceda added this to the v1-Next milestone Jan 29, 2018
@lbalmaceda lbalmaceda requested a review from cocojoe January 29, 2018 20:40
@cocojoe
Copy link
Member

cocojoe commented Jan 30, 2018

Have been testing on a Nexus 6 API 25 using Chrome.

  • HLP DB 👍
  • HLP Social / MFA 👍
  • Passwordless 👍

Would be good to hear feedback from @msalokangas on this.

Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

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

Provision LGTM, be good to get some additional feedback.

@lbalmaceda
Copy link
Contributor Author

I'll give them a few hours. Thanks @cocojoe

@lbalmaceda lbalmaceda merged commit a5e6c8b into master Jan 31, 2018
@lbalmaceda lbalmaceda modified the milestones: v1-Next, 1.2.2 Jan 31, 2018
@lbalmaceda lbalmaceda deleted the fix-webauth branch January 31, 2018 17:09
@egorshulga
Copy link

After merging this PR the browser is being launched, I perform authentication, but then the browser is not being closed.
I have to press back button to return to the application.
I doubt this behavior was intended.

@cocojoe
Copy link
Member

cocojoe commented Feb 6, 2018

@egorshulga Please open a new issue and add reproducible steps e.g. Testing setup, browser etc
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

react-native-auth0 WebAuth popup
3 participants