xamarin / Xamarin.Auth

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

Facebook Login not redirecting to app #331

Closed sylendra7 closed 5 years ago

sylendra7 commented 5 years ago

I'm getting the "Error authenticating: invalid_request" while doing Facebook Login when the Redirection URL is fb2182097**://authorize

When the Redirection URL is https://www.facebook.com/connect/login_success.html then login is successfull but I'm not able to redirect to app

[Activity(Label = "FacebookUrlSchemeInterceptorActivity", NoHistory = true, LaunchMode = LaunchMode.SingleTop)] [IntentFilter( new[] { Intent.ActionView }, Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable }, DataSchemes = new[] { "fb2182097**", "com.xamarin.traditional.standard.samples.oauth.providers.android" }, DataPaths = new[] { "fb2182097**://authorize" })] public class FacebookUrlSchemeInterceptorActivity : Activity { protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Convert Android.Net.Url to Uri var uri = new Uri(Intent.Data.ToString());

        // Load redirectUrl page
        AuthenticationState.Authenticator.OnPageLoading(uri);
        var intent = new Intent(this, typeof(MainActivity));
        intent.SetFlags(ActivityFlags.ClearTop | ActivityFlags.SingleTop);
        StartActivity(intent);

        this.Finish();
    }
}

VS bug #733071, VS bug #943469

newky2k commented 5 years ago

@sylendra7 could you please provide a small sample that demonstrates the issue that we have to make it easier for us to investigate.

Regards

sylendra7 commented 5 years ago

Login.Xaml.cs.txt FacebookUrlSchemeInterceptorActivity.cs.txt Hi please take that two files where contains the actual code

sylendra7 commented 5 years ago

Login.Xaml.cs.txt FacebookUrlSchemeInterceptorActivity.cs.txt Hi please take that two files where contains the actual code @newky2k

newky2k commented 5 years ago

@sylendra7 Thanks for the links i'll get @moljac to look at it

Regards

jaydeeveloper commented 5 years ago

Hi everyone, any update about this issue? Do you need more information?

Regards

jaydeeveloper commented 5 years ago

@newky2k @moljac @Redth I reproduce this error with an old android emulator that only have WebView. I can confirm there is no error on emulator with Chrome intalled.

However, there is an old error that seams to be closed but it persist. #275

moljac commented 5 years ago

Tests for available packages Google added in separate library, which was ported, but never integrated completely.

Due to limited resources this will be "Low Priority"

sylendra7 commented 5 years ago

@newky2k @moljac @Redth @jaydeeveloper Hi any news about this issue...?

sylendra7 commented 5 years ago

Hi @moljac @Redth any fix about this ...?

Redth commented 5 years ago

This is a Facebook imposed limitation and not a bug with Xamarin.Auth. You should adapt your app to use the native facebook SDKs for sign in as per Facebook app developer policies. We will likely be deprecating any Facebook related functionality in xamarin auth soon. We are looking at ways to make integrating Facebook auth properly in your app easier in the future.

camou86 commented 5 years ago

Hi! I found this yesterday.

I implemented Facebook oAuth Login in Xamarin.Forms, visual studio 2019, C#

When I run the app over WIFI, it works perfect! Redirecting to the app included. If I run the app over 4g, I get the success url, and no redirect.

dev-krohnheinze commented 4 years ago

As xamarin auth will not support facebook functionality in the future ... is there a simple working sample for using native facebook sdk and login only?

jvillaro commented 4 years ago

As xamarin auth will not support facebook functionality in the future ... is there a simple working sample for using native facebook sdk and login only?

I need this as well