Socket
Socket
Sign inDemoInstall

angularjs-sociallogin

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angularjs-sociallogin

Social Authentication for AngularJS application.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

AngularJS Social Login (socialLogin)

AngularJS Social Login Module is a simple client side authentication module which helps to authenticate your application using Google/Facebook/LinkedIN. It doesn't maintain any session, session between client application and server should be maintained by yourself after receiving user details from the provider.

Supported sites:

  • Google
  • Facebook
  • LinkedIN

Installation

via npm

npm install angularjs-social-login --save

via bower

bower install angularjs-social-login --save

configure installation

Include JS files:

<script src="bower_components/angularjs-social-login/angularjs-social-login.js"></script>

Then include socialLogin as a dependency for your app:

angular.module('myApp', ['socialLogin']);

Configuration

Example

app.config(function(socialProvider){
	socialProvider.setGoogleKey("YOUR GOOGLE CLIENT ID");
  socialProvider.setLinkedInKey("YOUR LINKEDIN CLIENT ID");
  socialProvider.setFbKey({appId: "YOUR FACEBOOK APP ID", apiVersion: "API VERSION"});
});

Usage

There are total three directives for handling Google, Facebook, LinkedIn authentication.

  • fbLogin (For Facebook)
  • gLogin (For Google)
  • linkedIn (For LinkedIn)

Methods

  • socialProvider.setGoogleKey("YOUR GOOGLE CLIENT ID")
  • socialProvider.setLinkedInKey("YOUR LINKEDIN CLIENT ID")
  • socialProvider.setFbKey("YOUR FACEBOOK APP ID")
  • $rootScope.$on('event:social-sign-in-success', function(event, userDetails){}) Braodcast event which will be triggered after successful authentication. userDetails is an Object consists of {name: <user_name>, email: <user_email>, imageUrl: <image_url>, uid: <UID by social vendor>, provider: <Google/Facebook/LinkedIN>, token: <Google ID token for google, accessToken for Facebook, no token for linkedIN>}
  • socialLoginService.logout() For logout
  • $rootScope.$on('event:social-sign-out-success', function(event, logoutStatus){}) Braodcast event which will be triggered after successful logout.

Example

<button g-login type="button">Google Login</button>
<button linked-in type="button">LinkedIn Login</button>
<button fb-login type="button">facebook Login</button>

FAQs

Last updated on 22 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc