Johnee Masilamani
Johnee Masilamani

Reputation: 25

OAuth2Authenticator with Google and FaceBook on Mac

I am developing an application in mac using xamarin which needs to be connected with Google and FaceBook. I tried to use OAuth2Authenticator to Authenticate the users using below code:

 var auth = new OAuth2Authenticator (
                clientId: "myId.apps.googleusercontent.com",
                clientSecret: "mysecred",
                scope: "document",
                authorizeUrl: new Uri ("https://accounts.google.com/o/oauth2/auth"),
                redirectUrl: new Uri ("myredirect:oob"),
                accessTokenUrl: new Uri ("https://accounts.google.com/o/oauth2/token"),
                getUsernameAsync: null
            ); 

When I tried to get the url by using the method auth.GetUI() it throws

error "WebAuthenticator not supported on this platform."

Is there any other way to connect Gmail or Facebook within the Mac application.

Upvotes: 0

Views: 197

Answers (1)

Jauhenka
Jauhenka

Reputation: 162

You can pick an open-source library like this https://github.com/clancey/simpleauth

Or you have to write a binding of some existing MacOS library, but it's going to be a real pain.

Upvotes: 1

Related Questions