xamarin / Xamarin.Auth

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

UWP OAuth1Authenticator bug #415

Open slakul opened 5 years ago

slakul commented 5 years ago

Xamarin.Auth Issue

OAuth1Authenticator in UWP doesn't work.

  1. It created following request: http://api.shoplo.com/services/oauth/request_token?oauth_callback=https%3A%2F%2Fshoplo.com&oauth_nonce=18062545&oauth_timestamp=1567760926&oauth_version=1.0&oauth_consumer_key=c5b18385899edb543b68f299c694412b&oauth_signature_method=HMAC-SHA1&oauth_signature=

with empty "oauth_signature".

  1. Because of wrong signature method auth.GetInitialUrlAsync() throws an exception that is not catched in "OAuthLoginPresenter.Login" and crashes the application

As a workaround I created my own OAuth1Authenticator and OAuth1. In OAuth1.GetSignature I allowed to create the signature using HMACSHA1 (used the code excluded by #if !PORTABLE && !NETFX_CORE).

Version

Steps to reproduce

  1. Authenticate using OAuth1Authenticator in UWP
  2. open login page: var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter(); presenter.Login(auth);

Platform:

Expected behaviour

Application shouldn't close, but show login page

Actual behaviour

Application is being closed.