Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kuzzleio/kuzzle-sdk-login-oauth-popup
Kuzzle module for JS SDK to allow to login with oauth strategy using a popup on browser side
https://github.com/kuzzleio/kuzzle-sdk-login-oauth-popup
kuzzle-plugin kuzzle-sdk oauth
Last synced: about 2 months ago
JSON representation
Kuzzle module for JS SDK to allow to login with oauth strategy using a popup on browser side
- Host: GitHub
- URL: https://github.com/kuzzleio/kuzzle-sdk-login-oauth-popup
- Owner: kuzzleio
- License: apache-2.0
- Archived: true
- Created: 2016-06-29T08:04:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-24T15:31:18.000Z (over 6 years ago)
- Last Synced: 2024-07-07T05:21:49.817Z (2 months ago)
- Topics: kuzzle-plugin, kuzzle-sdk, oauth
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 13
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/kuzzleio/kuzzle-sdk-login-oauth-popup.svg?branch=master)](https://travis-ci.org/kuzzleio/kuzzle-sdk-login-oauth-popup)
# Description
kuzzle-sdk-login-oauth-popup is an extension for the [Kuzzle javascript-sdk](https://github.com/kuzzleio/sdk-javascript).
It's meaning is to add the loginOauthPopup method to your SDK Kuzzle instance to be able to login with an OAUTH strategy by opening a popup to the chosen provider.# Prerequisite
You need to have the Kuzzle javascript SDK included in your project in order to make it work.
```sh
$ bower install kuzzle-sdk
``````html
```
# Definition
```js
loginOauthPopup(strategy, [options], [callback])| Arguments | Type | Description | Default
|---------------|---------|----------------------------------------|
| ``strategy`` | string | The strategy to use |
| ``options`` | string | Options that will be given to the window.open | 'width=800, height=600'
| ``cb`` | Function | The callback |```
# Installation
```sh
$ bower install kuzzle-sdk-login-oauth-popup
``````html
```
# Usage
```js
var kuzzle = new Kuzzle('http://localhost');
kuzzle.loginOauthPopup('facebook', function(err, res) {
// res should contain the _id and jwt token of the logged user
});
```