Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Kuzzle module for JS SDK to allow to login with oauth strategy using a popup on browser side

License

Notifications You must be signed in to change notification settings

kuzzleio/kuzzle-sdk-login-oauth-popup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Description

kuzzle-sdk-login-oauth-popup is an extension for the Kuzzle javascript-sdk.

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.

$ bower install kuzzle-sdk
<script src="sdk-javascript/dist/kuzzle.js"></script>

Definition

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

$ bower install kuzzle-sdk-login-oauth-popup
<script src="kuzzle-sdk-login-oauth-popup/index.js"></script>

Usage

var kuzzle = new Kuzzle('http://localhost');
kuzzle.loginOauthPopup('facebook', function(err, res) {
    // res should contain the _id and jwt token of the logged user
});

About

Kuzzle module for JS SDK to allow to login with oauth strategy using a popup on browser side

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published