1.2.0 • Published 6 years ago

github-oauth-popup v1.2.0

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

GitHub OAuth Popup

NPM

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

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago