github-oauth-popup

A popup window helper/component for GitHub login

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
github-oauth-popup
1.2.04 years ago4 years agoMinified + gzip package size for github-oauth-popup in KB

Readme

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 clientid 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