github-oauth-popup

1.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i github-oauth-popup

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

10.1 kB

Total Files

6

Last publish

Collaborators

  • juresotosek