iOS Web Authentication Broker causes InvalidOperationException if dialog is cancelled. #19666
Labels
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
kind/bug
Something isn't working
triage/untriaged
Indicates an issue requires triaging or verification
Current behavior
When using OIDC to authenticate on iOS, the system will show a dialog asking if the uses want's to use X website to login.
If the user presses the cancel button then the WebAuthenticationBrokerProvider will throw a
InvalidOperationException
with the messageAn attempt was made to transition a task to a final state when it had already completed.
Expected behavior
Cancelling this dialog should return an unauthenticated result without throwing an exception in the Main.iOS class.
How to reproduce it (as minimally and precisely as possible)
Minimal Repo
BugReport.zip
Workaround
Add a try catch statement to the Main.iOS class.
This will prevent the app immediately crashing out but is a bit of a kludge fix.
Works on UWP/WinUI
Yes
Environment
Uno.UI.DevServer / Uno.WinUI.DevServer, Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
Packages installed using the SDK (version 5.6.70)
Affected platforms
iOS, Mac Catalyst
IDE
Rider macOS
IDE version
2024.3.6
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: