angularjs-social-login

WebJar for angularjs-social-login

Лицензия

Лицензия

MIT
Категории

Категории

JavaScript Языки программирования Angular Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

angularjs-social-login
Последняя версия

Последняя версия

2.6.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

angularjs-social-login
WebJar for angularjs-social-login
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/heresy/angularjs-social-login

Скачать angularjs-social-login

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/angularjs-social-login/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>angularjs-social-login</artifactId>
    <version>2.6.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/angularjs-social-login/
implementation 'org.webjars.npm:angularjs-social-login:2.6.1'
// https://jarcasting.com/artifacts/org.webjars.npm/angularjs-social-login/
implementation ("org.webjars.npm:angularjs-social-login:2.6.1")
'org.webjars.npm:angularjs-social-login:jar:2.6.1'
<dependency org="org.webjars.npm" name="angularjs-social-login" rev="2.6.1">
  <artifact name="angularjs-social-login" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='angularjs-social-login', version='2.6.1')
)
libraryDependencies += "org.webjars.npm" % "angularjs-social-login" % "2.6.1"
[org.webjars.npm/angularjs-social-login "2.6.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : angular jar [1.6.1,1.7)

Модули Проекта

Данный проект не имеет модулей.

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: < accessToken for Facebook & google, no token for linkedIN>}, idToken: < google idToken >
  • 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>
org.webjars.npm

Heresy Infotech Private Limited

Версии библиотеки

Версия
2.6.1