2.1.2 • Published 4 years ago

electron-oauth-github v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

electron-oauth-github

This is Electron module that OAuth authenticates your Electron app with Github.

Install

npm install electron-oauth-github

Diving into OAuth

  1. Register your app

  2. Get Client ID and Client Secret

  3. Set Client ID, Client Secret and scopes. See example.

const OauthGithub = require('electron-oauth-github');

const github = new OauthGithub({
    id: process.env.GH_CLIENT_ID,
    secret: process.env.GH_CLIENT_SECRET,
    scopes: ['user:email', 'notifications'],
});

github.startRequest(function(accessToken, err) {
    if (err) {
        console.error(err);
    }

    console.log(accessToken);
});

Now you have got access token. Dive into OAuth!

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago