xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
541 stars 351 forks source link

UWP Redirect prompting "Did you mean to switch apps? #373

Open jjallen37 opened 5 years ago

jjallen37 commented 5 years ago

Xamarin.Auth Issue

Version

Steps to reproduce

  1. Create a Xamarin Forms UWP app that presents OAuth2/
  2. Declare your redirect protocol scheme in the App manifest declarations tab and configure your Identity provider to accept it. My identity provider is a locally deployed instance of Keycloak.
  3. Successfully authenticate and be prompted to switch apps

Platform:

Expected behaviour

The app should close the presenter without prompt and return credentials.

Actual behaviour

This happens every time. If you have multiple instances of your app then it really gets confused. image

Additional Notes

The prompt will run before OnActivated is called in App.xaml.cs.

FreelanceComputing commented 5 years ago

I am facing the same issue while using the following components: Windows 10 Home version 10.0 build 17134 .Net Standard version 2.0.1 Xamarin.Forms version 4.0.0.425677 Xamarin.Auth version 1.6.0.4

When Yes is Clicked, OnActivated method executes as expected but this really sucks from a UX POV. Is there any way for this to be suppressed?

refusal commented 5 years ago

@FreelanceComputing @jjallen37 Did you find any solution?

jjallen37 commented 4 years ago

@refusal Unfortunately I ended up writing things with a webview in each platform, which has definitely improved the user experience, but I know that doesn't meet security requirements for all projects.

A while back I did find the code that I think is responsible for this bug however https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-default-app#call-launchuriasync-to-launch-a-uri