xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
541 stars 351 forks source link

Microsoft OAuth with isUsingNativeUI: true #307

Open mrxten opened 6 years ago

mrxten commented 6 years ago

Xamarin.Auth Issue

Getting "Error authenticating: invalid_grant" in opening redirect_url for Microsoft auth

Version

nuget version = 1.6.0.2

Steps to reproduce

  1. Configured OAuth2Authenticator

    image
  2. Configured info.plist

    image
  3. Added OpenUrl in AppDelegate:

    image

After calling StaticState.AuthenticatorState.OnPageLoading(uri); get error in "Error authenticating: invalid_grant" in _auth.Error event:

image

VS bug #733074, VS bug #976474, VS bug #1080833

mrxten commented 6 years ago

And yes, this redirect_url specified in microsoft app panel

Redth commented 5 years ago

Possibly related to #208 ?

mrxten commented 5 years ago

@Redth this problem not related to some platform. appearing both in ios and android

moljac commented 5 years ago

Microsoft OAuth has changed since this was implemented, so I need to dive deeper.

This is not UWP related. Something with OAuth2 settings.

wadebaird commented 5 years ago

I am encountering the same issue as well in my implementation. Setting isUsingNativeUI to false is not allowing me to login with Android, however setting it to true works and I encountering the "invalid_grant" error on iOS.

Brosten commented 5 years ago

I'm also recieving this invalid_grant. Seems to work to just ignore it, but I guess it better be fixed?

elix182 commented 5 years ago

Is there any update or workaround for this?, I'm also getting an "invalid_grant" on iOS, in android it's working fine. I have tried to set IsUsingNativeUI to false and i'm still getting the same result.

I'm using nuget package 1.7.0

sumitkrmishra commented 4 years ago

Hi, I am also getting the same error as invalid_grant and invalid_request in xamarin.ios using xamarin.auth. I'm using nuget package 1.7.0. Please help to solve this issue.

bharatkolla11 commented 4 years ago

i am using Xamarin.Auth (1.7.0) and getting this error. Any update on when it will be fixed ?