Handles device based login flows
Usage:
const oauthConfig = { loginUrl: this.flags.instanceurl, clientId: this.flags.clientid,};const deviceOauthService = await DeviceOauthService.create(oauthConfig);const loginData = await deviceOauthService.requestDeviceLogin();console.log(loginData);const approval = await deviceOauthService.awaitDeviceApproval(loginData);const authInfo = await deviceOauthService.authorizeAndSave(approval); Copy
const oauthConfig = { loginUrl: this.flags.instanceurl, clientId: this.flags.clientid,};const deviceOauthService = await DeviceOauthService.create(oauthConfig);const loginData = await deviceOauthService.requestDeviceLogin();console.log(loginData);const approval = await deviceOauthService.awaitDeviceApproval(loginData);const authInfo = await deviceOauthService.authorizeAndSave(approval);
Static
Creates and saves new AuthInfo
Polls the server until successful response OR max attempts have been made
Begin the authorization flow by requesting the login
Handles device based login flows
Usage: