xamarin.auth

Azure Mobile Services LoginAsync method not working with Microsoft Auth Token

偶尔善良 提交于 2021-02-08 07:57:25
问题 I have successfully been able to get an access_token (or authenticationToken for Microsoft tokens) using the client side authentication in my Xamarin forms App. I am able to get further user information (email, name, etc.) using the same access token. Now, when I try to pass that token to my Azure Mobile Service backend, I get a 401 error. Here is my code: private async System.Threading.Tasks.Task<string> MSGetUserInfo(Account account) { // Reference: http://graph.microsoft.io/en-us/docs

Azure Mobile Services LoginAsync method not working with Microsoft Auth Token

余生长醉 提交于 2021-02-08 07:57:21
问题 I have successfully been able to get an access_token (or authenticationToken for Microsoft tokens) using the client side authentication in my Xamarin forms App. I am able to get further user information (email, name, etc.) using the same access token. Now, when I try to pass that token to my Azure Mobile Service backend, I get a 401 error. Here is my code: private async System.Threading.Tasks.Task<string> MSGetUserInfo(Account account) { // Reference: http://graph.microsoft.io/en-us/docs

Authentication Error e.Message = OAuth Error = Permissions+error

故事扮演 提交于 2021-02-08 05:44:24
问题 I'm using Xamarin.Auth version 1.5.0.3 in my xamarin.android and xamarin.ios (PCL) project for application authentication/login with facebook's OAuth API. The issue arises after I click on the "Not now" link (watch the screenshot below). I get the following error dialog: Authentication Error e.Message = OAuth Error = Permissions+error Is there any way to disable this link or to fix it somehow? Or does someone have an idea why this happens? iOS code (which works now): public override void

Xamarin.Auth Facebook login Completed event not firing

最后都变了- 提交于 2021-01-29 13:16:47
问题 I am trying to create a Xamarin.Forms application with a Facebook login button. Everything works up until the part where the Completed event, which never gets fired. I am using a PageRenderer to initiate the auth flow as follows: [assembly: ExportRenderer(typeof(Page1), typeof(LoginPageRenderer))] namespace xmrn1.Droid { class LoginPageRenderer : PageRenderer { private const string ClientId = "<sanitized>"; public LoginPageRenderer(Context ctx) : base(ctx) { } protected override void

Xamarin.Auth: Account data not persisted when app is updated

非 Y 不嫁゛ 提交于 2020-01-03 19:01:51
问题 I'm using Xamarin.Auth to authenticate with services like foursquare and so. I've gotten my authentication code working all good, the problem is that the account data is not persisted when I deploy a new version of my app - each time I deploy a test version on the phone, I've to re-authenticate. Here's how I store the account; /// <summary> /// Stores the account. /// </summary> private void StoreAccount(AuthenticatorCompletedEventArgs eventArgs) { if (!eventArgs.IsAuthenticated) // make sure

Xamarin.Auth: Account data not persisted when app is updated

 ̄綄美尐妖づ 提交于 2020-01-03 19:01:06
问题 I'm using Xamarin.Auth to authenticate with services like foursquare and so. I've gotten my authentication code working all good, the problem is that the account data is not persisted when I deploy a new version of my app - each time I deploy a test version on the phone, I've to re-authenticate. Here's how I store the account; /// <summary> /// Stores the account. /// </summary> private void StoreAccount(AuthenticatorCompletedEventArgs eventArgs) { if (!eventArgs.IsAuthenticated) // make sure

Xamarin Forms with Xamarin Player OAuth2 NInterpretException

半腔热情 提交于 2019-12-25 03:32:36
问题 I'm currently on developing some little application for iOS and Android. Therefore I need an OAuth2 authentication. How I proceeded (from here) Create a new Xamarin.Forms project from the templates with the default Item and About page Add Dependency for Xamarin.Auth Use the button on the about page to trigger a function with the following: var authenticator = new OAuth2Authenticator( "CLIENTID" , "SCOPE", new Uri("AUTH_URL"), new Uri("REDIRECT_URL) null, true); Add the iOS initializer in the

Xamarin Forms with Xamarin Player OAuth2 NInterpretException

一曲冷凌霜 提交于 2019-12-25 03:32:13
问题 I'm currently on developing some little application for iOS and Android. Therefore I need an OAuth2 authentication. How I proceeded (from here) Create a new Xamarin.Forms project from the templates with the default Item and About page Add Dependency for Xamarin.Auth Use the button on the about page to trigger a function with the following: var authenticator = new OAuth2Authenticator( "CLIENTID" , "SCOPE", new Uri("AUTH_URL"), new Uri("REDIRECT_URL) null, true); Add the iOS initializer in the

Xamarin.Auth, WebView Clear Cookies on Android

别等时光非礼了梦想. 提交于 2019-12-23 16:15:37
问题 I've tried probably everything I could find online regarding clearing the cookies for an Android WebView using Xamarin.Auth. The Auth library does not expose the Android WebView; I cannot use its WebSettings nor clear the cache on that WebView object. Xamarin.Auth exposes a method for clearing cookies: public static void ClearCookies() { global::Android.Webkit.CookieSyncManager.CreateInstance(global::Android.App.Application.Context); global::Android.Webkit.CookieManager.Instance

Xamarin MobileServiceClient RefreshUserAsync with Google 403

拜拜、爱过 提交于 2019-12-23 05:03:51
问题 I am using Azure's MobileServiceClient sdk to authenticate with my server. With the upgrades to 4.x version I am also using Xamarin.Auth to authenticate users with Google and Facebook. When the response comes back from Google I am getting a refresh token. I then call the mobile service sdk like so: var accessToken = account.Properties["access_token"]; var idToken = account.Properties["id_token"]; var zumoPayload = new JObject(); zumoPayload["access_token"] = accessToken; zumoPayload["id_token