xamarin / Xamarin.Auth

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

How to use Instagram for sign in Xamarin.iOS Xamarin.Auth #349

Open vai1991sri opened 5 years ago

vai1991sri commented 5 years ago

Xamarin.Auth Issue

IF BUG, INCLUDE THIS PART:

Version

Steps to reproduce

1. 2. 3.

Platform:

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead Can you also include a screen shot?

IF IT IS A NEW FEATURE REQUEST, INCLUDE THIS PART:

Feature description

Write a description of the feature. How should it work? How should it look? Include some graphics if this could help!

VS bug #738678

vai1991sri commented 5 years ago

HI All, I was working on Sign in with instagram using Xamarin.Auth. In Xamarin.Android everything working fine. As i used Xamarin.Auth login with Instagram in Xamarin.IOS its not working. Please find below code for insta Login var auth = new OAuth2Authenticator( clientId: "XXXXXXXXXX7b59b492e8XXXXXX", clientSecret: "XXXXXXXXXXX6253XXXXXX", scope: "basic", authorizeUrl: new Uri(@"https://www.instagram.com/oauth/authorize"), redirectUrl: new Uri(@"https://xyzsesdede.azurewebsites.net/oauth2callback"), accessTokenUrl: new Uri(@"https://www.instagram.com/oauth/access_token"), getUsernameAsync: null); auth.Completed += LinkedInAuth_Completed; auth.BrowsingCompleted += Auth_BrowsingCompleted; auth.ClearCookiesBeforeLogin = true;

        auth.Error += Auth_Error;
        var ui = auth.GetUI();
        PresentViewController(ui, true, null);
        async void Auth_Error(object sender1, AuthenticatorErrorEventArgs e)
        {
            OAuth2Authenticator auth2 = (OAuth2Authenticator)sender1;
            auth2.ShowUIErrors = false;
            //auth2.OnCancelled();

        }
        async void LinkedInAuth_Completed(object sender1, AuthenticatorCompletedEventArgs e1)
        {
            if (e1.IsAuthenticated)
            {

            }
        }

Please help me Thank you

moljac commented 5 years ago

My Instagram tests were something like 2 years ago and knowning OAuth providers something changed for sure.

Moving it to Low Priority

In order to speed up the bugfixing, please add link to the repo with minimal sample (with removed sensitve data)

vai1991sri commented 5 years ago

Thank you. Actually I am developing my App for client so please let me know where I need to fix it or when I can expect time of completion of this ticket . Please let me know any instant solution so I can use that.

vai1991sri commented 5 years ago

https://us.v-cdn.net/5019960/uploads/editor/pj/98bl71a50gzl.zip In this link You can look into my sample app

vai1991sri commented 5 years ago

Any updates?

bastianbecker21 commented 5 years ago

No update yet?

subareddy14 commented 5 years ago

any update on it or can we which version it was working proper.