Get started with satellizer CDN

MIT licensed

Satellizer is a library that simplifies the process of implementing OAuth authentication in Angular applications.

Tags:
  • authentication
  • angularjs
  • facebook
  • google
  • linkedin
  • twitter
  • foursquare
  • github
  • yahoo
  • oauth
  • sign-in
  • twitch

Stable version

Copied!

How to start using satellizer CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with satellizer CDN - cdnhub.io</title>
  <script src="https://cdn.jsdelivr.net/npm/rxjs@6.6.3/bundles/rxjs.umd.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/angular@1.7.9/umd/angular.min.js"></script>
  <script src="https://cdn.cdnhub.io/satellizer/0.15.5/satellizer.min.js"></script>
  <script src="main.js"></script>
</head>
<body ng-app="myApp">
  <div ng-controller="MyController">
    <button ng-click="loginWithGoogle()">Login with Google</button>
  </div>

  <script>
    angular.module('myApp', ['satellizer'])
      .controller('MyController', ['$scope', '$auth', function($scope, $auth) {
        $scope.loginWithGoogle = function() {
          $auth.authenticate('google')
            .then(function() {
              console.log('Logged in as:', $auth.getPayload().email);
            })
            .catch(function(error) {
              console.log('Error:', error);
            });
        };
      }]);
  </script>
</body>
</html>

All versions