github-oauth-popup
v1.2.0
Published
A popup window helper/component for GitHub login
Downloads
255
Readme
GitHub OAuth Popup
A popup window helper/component for GitHub login.
Inpired and coppied by/from react-github-login
Example
http://buildastack.io/ - Top right corner.
Install
$ yarn add github-oauth-popup
Usage
import { loginWithGithub } from 'github-oauth-popup';
const params = {
client_id: 'id',
scope: 'read:user'
}
);
loginWithGithub(params).then(res => console.log('Code: ', res.code))
API
loginWithGithub(params, options?, url?, id?)
params
An object that contains the client_id and the scope requested
options
Options for the popup window
default
{
height: 1000,
width: 600
}
url
The auth url
default
'https://github.com/login/oauth/authorize';
id
Popup window id
default
'github-oauth-authorize';
License
MIT © Jure Sotosek