android - OAuth2 and UWP Xamarin.Forms -


can 1 me problem?

i don`t know how use oauth2 uwp.

for example, on andriod code of authentication looks this:

[assembly: exportrenderer(typeof(loginpage), typeof(loginpagerenderer))]  namespace testtask.droid {     class loginpagerenderer : pagerenderer     {         private static bool _isshown;         protected override void onelementchanged(elementchangedeventargs<page> e)         {             base.onelementchanged(e);              if (_isshown) return;             _isshown = true;              var activity = this.context activity;              var auth = new oauth2authenticator(                 clientid: "someid",                 scope: "",                 authorizeurl: new uri("https://oauth.vk.com/authorize"),                 redirecturl: new uri("https://oauth.vk.com/blank.html"));              auth.completed += (sender, eventargs) => {                 if (eventargs.isauthenticated)                 {                     authinfo.token = eventargs.account.properties["access_token"].tostring();                     authinfo.userid = eventargs.account.properties["user_id"].tostring();                 }                 else                 {                     // user cancelled                 }             };              activity?.startactivity((intent)auth.getui(activity));         }     } } 

so, on android solution in method

protected override void onelementchanged(elementchangedeventargs<page> e) 

and in row fo code

activity?.startactivity((intent)auth.getui(activity)); 

my question is: how can same in uwp, or how can make work in uwp?

my question is: how can same in uwp, or how can make work in uwp?

i'm not sure whether xamarin.auth supports uwp or not, uwp, can use web authentication broker oauth, can check official webauthenticationbroker sample, it's not xamarin, can code in native uwp project , use custom renderer same thing in xamarin.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -