xamarin / Xamarin.Auth

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

Ignore Possible Forgery Error #436

Open rhodesie123 opened 4 years ago

rhodesie123 commented 4 years ago

IF IT IS A NEW FEATURE REQUEST, INCLUDE THIS PART:

Feature description

Heya,

Great package for OAuth2 in Xamarin, however, sometimes the service I am coinnecting to does not allow custom schema redirect urls. In these instances it's great to have the option of NOT using the nativeUI. Problem is that "Possible Forgery" error popup appears when the "state" query attribute is returned and is improperly handled. This can happen for a multitude of reasons I have found for products like Xero or MYOB for example.

I have thus extended OAuth2Authenticator class and overriden the OnPageRendered function to ignore the state query string check, however, if there was a switch that disabled this check it would be great.

Thanks and keep up the great work!