Description
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 message An 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)
- Add an OIDC configuration to the project config file
- Run the project with the iOS head
- Press the login button
- When the dialog appears, press cancel
- The InvalidOperationException will be thrown from the Main.iOS class
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
Activity