xamarin/Xamarin.Auth

UWP OAuth1Authenticator bug

slakul opened this issue · 0 comments

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

  • nuget version = 1.7.0
  • component version = 1.6.0.1
  • sample

Steps to reproduce

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

Platform:

  • UWP

Expected behaviour

Application shouldn't close, but show login page

Actual behaviour

Application is being closed.