Can you fill in any of the gaps in this, regarding use of Xamarin.Auth and OAuth?

JohnHardmanJohnHardman GBUniversity ✭✭✭✭✭

Cross-posting from https://forums.xamarin.com/discussion/90117/can-you-fill-in-any-of-the-gaps-in-this-regarding-use-of-xamarin-auth-and-oauth#latest as here is probably the correct place to ask this.

Here’s a summary of what I have found using Xamarin.Auth 1.3.2.1 (I had to rollback from 1.3.2.2) and OAuth in general. This refers to testing on Android unless otherwise stated.

(1) I have Facebook and Microsoft working using implicit flow (but not authorisation code flow). I suspect Microsoft supports authorisation code flow, but haven’t worked out what the 6th argument would be in the constructor shown in (2) below

        _authenticator2 = new OAuth2Authenticator
        (
            _authorisationServer.ClientId,
            _authorisationServer.Scope,
            _authorisationServer.AuthorizationEndpoint,
            _authorisationServer.RedirectionEndpoint
        )

(2) I have LinkedIn working using authorisation code flow (but not implicit flow)

        _authenticator2 = new OAuth2Authenticator
        (
            _authorisationServer.ClientId,
            _authorisationServer.ClientSecret,
            _authorisationServer.Scope,
            _authorisationServer.AuthorizationEndpoint,
            _authorisationServer.RedirectionEndpoint,
            _authorisationServer.TokenEndpoint
        )

(3) DropBox documentation (ref. https://www.dropbox.com/developers/documentation/http/documentation ) says: “Note: OAuth is an authorization protocol, not an authentication protocol. Dropbox should not be used as an identity provider.”

(4) I don’t think Xamarin.Auth supports Google currently, since Google withdrew support for Web apps.

(5) Twitter is a mystery. I’m unclear as to whether it should work with OAuth1 or OAuth2, and whether it works with Xamain.Auth . Let’s just say I’ve had no success so far. The bits of code and forums threads that I've found for Twitter are mostly pretty old.

(6) How to use Xamarin.Auth from UWP or WinRT without developing a PageRenderer is a big question mark.

(7) There seems to be a difference in behavior in Xamarin.Auth.KeyChainAccountStore.Delete between Android and iOS, as to what happens when the item is not found.

(8) I haven't yet worked out how to get an email address and profile image when authenticating against Microsoft.

(9) I haven't yet found a working sample that shows tokens being refreshed successfully.

Does that match other people’s experience with Xamarin.Auth and OAuth? If you have managed to get bits working other than those listed above, could you fill the gaps please as to how you did so.

Sign In or Register to comment.