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

[Android] Fix NullReferenceException on WebAuthenticatorIntermediateActivity #15052

Closed
wants to merge 1 commit into from

Conversation

Px7-941
Copy link

@Px7-941 Px7-941 commented May 12, 2023

Description of Change

This pull request fixes a NullReferenceException in WebAuthenticatorIntermediateActivity.
Complements this merged pull request #12347.

Issues Fixed

Fixes #13302, #13798, #12347

Browser tests

The following browsers have been configured as the default app in the Android operating system.

Browser CustomTab Fallback Login Logout Comment Fix
Chrome true false ok ok - -
Samsung true true ok ok - -
Firefox true false ok ok - -
Brave true false ok ok - -
Edge true false ok ok - -
Vivaldi true false ok ok - -
Opera false true ok ok - -
Tor true false nok nok - -
Mi Browser false true ok ok main activity remains hidden LaunchMode.SingleTask
Duckduckgo false true ok ok main activity remains hidden LaunchMode.SingleTask

For some browsers a correction of the user implementation is necessary. LaunchMode = LaunchMode.SingleTask.
https://github.com/dotnet/docs-maui/blob/main/docs/platform-integration/snippets/shared_1/Platforms/Android/WebAuthActivity.cs#L6

@ghost ghost added the community ✨ Community Contribution label May 12, 2023
@ghost
Copy link

ghost commented May 12, 2023

Hey there @Px7-941! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Px7-941
Copy link
Author

Px7-941 commented May 12, 2023

@microsoft-github-policy-service agree

@Eilon Eilon added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label May 12, 2023
@Px7-941 Px7-941 changed the title Fix NullReferenceException on WebAuthenticatorIntermediateActivity [Android] Fix NullReferenceException on WebAuthenticatorIntermediateActivity May 13, 2023
@rmarinho rmarinho requested a review from mattleibow May 18, 2023 15:05
@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Redth
Copy link
Member

Redth commented May 19, 2023

I don't believe this is the correct or necessary fix. The reason this is getting into a state where that value is null is due to the start of the flow being from a system browser which is not supposed to call back into the intermediate activity.

#15187 Should fix this.

If you want to use custom tabs, you are likely missing some values in your manifest required in newer android versions. See the doc

@Redth Redth closed this May 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info community ✨ Community Contribution platform/android 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebAuthenticator crash with some browsers
5 participants