authorize.js
- Version:
- 
		- 2.0.0
 
- Copyright:
- 
		- 2024 Mediumroast, Inc. All rights reserved.
 
- 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-table3
- module:configparser
- module:FilesystemOperators
Classes
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 saveToConfigBoolean Save to the configuration file, default is true - Source:
 
 Mediumroast for GitHub SDK and CLI
Mediumroast for GitHub SDK and CLI