Module: GitHubAuth

authorize.js

Version:
  • 2.0.0
Author:
License:
  • Apache-2.0
Source:

Example

import {GitHubAuth} from './api/authorize.js'
const github = new GitHubAuth(env, environ, configFile)
const githubToken = github.verifyAccessToken()

Requires

  • module:axios
  • module:open
  • module:octoDevAuth
  • module:chalk
  • module:cli-table
  • module:configparser
  • module:FilesystemOperators

Classes

GitHubAuth

Methods


<async, inner> getAccessTokenDeviceFlow()

Get the access token using the device flow

Source:
Returns:

The access token object

Type
Object

<async, inner> verifyAccessToken(saveToConfig)

Verify if the access token is valid and if not get a new one depending on this.env.authType

Parameters:
Name Type Description
saveToConfig Boolean

Save to the configuration file, default is true

Source: