Skip to content

Angular module which handles login with the Google Sign In API

License

Notifications You must be signed in to change notification settings

vixtech/ng-google-signin

 
 

Repository files navigation

ng-google-plus

Build Status Dependency Status Dev Dependency Status

An angular module that handles login with the Google Signin API

Demo

Try this demo.

Install

Install the angular module with bower.

$ bower install ng-google-signin

Install the angular module with npm.

$ npm install ng-google-signin

Usage

var app = angular.module('app', ['google-signin']);

app.config(['GoogleSigninProvider', function(GoogleSigninProvider) {
     GoogleSigninProvider.init({
        client_id: 'YOUR_CLIENT_ID',
     });
}]);

app.controller('AuthCtrl', ['$scope', 'GoogleSignin', function ($scope, 
GoogleSignin) {
    $scope.login = function () {
        GoogleSignin.signIn().then(function (user) {
            console.log(user);
        }, function (err) {
            console.log(err);
        });
    };
}]);

Credits

About

Angular module which handles login with the Google Sign In API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%