Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticate with Google - how to? #280

Open
lucnat opened this issue Jun 23, 2017 · 1 comment
Open

Authenticate with Google - how to? #280

lucnat opened this issue Jun 23, 2017 · 1 comment

Comments

@lucnat
Copy link

lucnat commented Jun 23, 2017

I managed to do facebook login like this:

ApiV1.addRoute('facebooklogin', {authRequired: false}, {
    post: {
        action: function () {
            var accessToken = this.bodyParams.accessToken || this.urlParams.accessToken;
            var email = this.bodyParams.email;
            var name = this.bodyParams.name;
            if (accessToken) {
                return facebookLoginWithAccessToken(accessToken, email, name)
            }
            return {
                statusCode: 400,
                body: {
                    status: "fail",
                    message: "Unable to Post to FB Login. Values Received: accessToken: " + accessToken + ", email: " + email + ", name: " + name
                }
            };
        }
    }
});

where the function facebookLoginWithAccessToken is from here: http://stackoverflow.com/questions/18118503/how-can-i-login-to-meteor-with-native-device-facebook

Has anybody got something similar for authentication with google? Would I proceed more or less in the similar way to make this happen?

@lucnat
Copy link
Author

lucnat commented Sep 4, 2017

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant