xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
542 stars 350 forks source link

Xamarin Auth 1.6.0.4 fully not working on Opera. Chrome doesn't redirect (Android) #377

Open holdbetter opened 5 years ago

holdbetter commented 5 years ago

Opera and maybe other browsers log in don't work at all. Also, if your "opens wth Chrome" after successfull log in doesn't redirect to your app page.

Version

Steps to reproduce (Opera)

  1. Only for Android. (iOS didn't check)
  2. You can download sample (https://developer.xamarin.com/samples/xamarin-forms/WebServices/OAuthNativeFlow/)
  3. Update Nuget packages to 1.6.0.4
  4. Run project and start login with Opera browser - you will get redirect without success log in, but you will have Authorization code in your Uri.

Steps to reproduce (opens with Chrome)

  1. Only for Android. (iOS didn't check)
  2. You can download sample (https://developer.xamarin.com/samples/xamarin-forms/WebServices/OAuthNativeFlow/)
  3. Nuget packages is 1.6.0.2 or above
  4. Run project and open log in with Chrome browser

Expected behaviour

I don't want to check other browsers, because i spent a day for 1.6.0.4 debugging in Opera, but i guess there are the same problem.

So, Opera and other browsers should work, because returned Uri is correct (you can check it with breakpoint on OnPageLoading method).

Actual behaviour

There is some differences. Chrome has only one page with "account chooser" page and it runs in my app directly, browser don't opens like a app. After your account choice it runs windows with "Please, wait" -> after this you successfully logged in -> Uri is OK, but redirect doesn't work correctly -> toast shows and nothing more -> it runs "choose account" page again in app.

Chrome1Page

Opera has two pages:

  1. Account choosing with different than Chrome design.
  2. "OAuth window access" page with Deny/Allow buttons

Opera1Page Opera2Page

(v1.6.0.4 Opera) If you press "Deny" it's redirect to your app without log in. If you press "Allow" it's redirect you without log in, but Uri is correct (it has AuthCode)

(v1.6.0.2 Opera) If you press "Deny" it's redirect to your app without log in. If you press "Allow" it doesn't redirect you, but you logged in and Uri is correct. Pressing back button few times returns you to your app with successfully log in.

Other Questions

Why you don't update release notes? 1.6.0.2 -> 1.6.0.4 breaks log in on Opera and i can't check what you had changed.

How i can turn off toast? Or change toast text? It's annoying and useless. 0 information in tutorials.

And if you can add please more infromation about methods and properties to OAuth classes. Intellisense is empty.

Thanks.

moljac commented 5 years ago

To support Opera it will be quite a lot of work. Namely, CustomTabs enumerates packages (android apps) that are able to open http scheme and if I can recall correctly there were only variants of Chrome in the code,

How i can turn off toast?

Not sure.

moljac commented 5 years ago

Similar https://github.com/xamarin/Xamarin.Auth/issues/375

tipa commented 5 years ago

How i can turn off toast?

CustomTabsConfiguration.CustomTabsClosingMessage = null;