Skip to main content

Class: OAuth

OAuth Helper Class

Constructors​

constructor​

• new OAuth()

Methods​

authenticate​

▸ Static authenticate(code): Promise<AuthenticateResponse>

Authenticate to obtain a token and refresh token using the code from the authorize method

Parameters​

NameTypeDescription
codestringcode obtained from the authorize method

Returns​

Promise<AuthenticateResponse>


authorize​

▸ Static authorize(): Promise<AuthenticateResponse>

Start the authorization process

Returns​

Promise<AuthenticateResponse>

▸ Static authorize(manual): Promise<AuthorizeResponse>

Parameters​

NameType
manualtrue

Returns​

Promise<AuthorizeResponse>


refreshToken​

▸ Static refreshToken(refreshToken): Promise<RefreshResponse>

Parameters​

NameType
refreshTokenstring

Returns​

Promise<RefreshResponse>