c# - Xamarin Forms Google Authenticateion, Error: disallowed_useragent -


currently developing xamarin forms application , added google authentication. here code pcl:

 var authenticator = new oauth2authenticator(     clientid,     null,     constants.scope,     new uri(constants.authorizeurl),     new uri(redirecturi),     new uri(constants.accesstokenurl),      null,     true);  authenticator.completed += this.onauthcompleted; authenticator.error += this.onautherror;  authenticationstate.authenticator = authenticator;  var presenter = new xamarin.auth.presenters.oauthloginpresenter(); presenter.login(authenticator);

i using latest version of xamarin.auth, 1.5.0.3 receive: screenshot

i went through many articles , code examples, looks maybe google updated authentication once again. link 1, link 2, link 3, link 4. event on official page xamarin.forms example invalid , not working link 5.

i checked several code examples, again no success, sample 1 , multiple samples here. download source , tried use it, expecting it's working, they're failing well.

do have solution issue or article, date , know it's working. code sample brilliant.

thanks in advance!

on android, google requires chrome custom tabs used instead of webview due security reasons.

if running emulator (or device) not have chrome installed (preinstalled oem or via play store), xamarin.auth default using webview. accepted google in parts of world (i.e. china chrome might not pre-installed device oems), otherwise google reject webview clients via disallowed_useragent error.

if running genymotion emulator, install chrome via play store. if not have play store installed, install gapps (via http://opengapps.org)


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -