PeterStaev / nativescript-azure-mobile-apps

:cloud: NativeScript plugin for working with Microsoft Azure Mobile Apps services
Apache License 2.0
30 stars 10 forks source link

Google auth fails with disallowed_useragent on Android #32

Closed romandrahan closed 3 years ago

romandrahan commented 5 years ago

Google auth fails with disallowed_useragent on Android: http://take.ms/BLLFD. While it works perfectly on iOS.

I've tried adding intent filter to the AndroidManifest.xml with no luck:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data android:scheme="x-msauth-tns-azure-sample" android:host="easyauth.callback" />
</intent-filter>

As mentioned here we need to use updated MobileServiceClient.login method, that now also accepts uriScheme and authRequestCode.

So looks like this line have to be updated.

romandrahan commented 5 years ago

cc @PeterStaev

PeterStaev commented 5 years ago

@romandragan , since I'm the owner the of repo there is no need to CC me...

From what I see seems Azure does not provide a good workaround for this case (like they have built int for iOS) and it is suggested to use browser login and then pass the received token to the login method directly, instead of using the current workflow.

I'll mark this as an enhancement but I do not have any ETA/fix that I can share at the moment.