AOAuth2Application

Subclass for any Application backed by OAuth2.

import AOAuth2Application from '@orchesty/nodejs-sdk/dist/lib/Authorization/Type/OAuth2/AOAuth2Application';

Inheritance #

AApplication -> AOAuth2Application

Methods you implement #

In addition to the base methods inherited from AApplication:

MethodReturnsPurpose
getAuthUrl()stringProvider's authorization endpoint.
getTokenUrl()stringProvider's token endpoint.
getScopes()string[]Scopes to request during authorization.

Methods provided #

MethodReturnsPurpose
getAccessToken(install)stringCurrent access token, refreshed by the platform if expired.
refreshAuthorization(install)Promise<ApplicationInstall>Force refresh; called automatically by the platform.
getAuthorizationToken(install, redirectUrl)stringBuilds the authorize URL the Admin UI redirects the user to.
setAuthorizationToken(install, token)Promise<ApplicationInstall>Stores the token returned by the provider's callback.

Example #

See Development: OAuth2 Application for a complete worked example.

See also #

© 2025 Orchesty Solutions. All rights reserved.