@continuous-auth/client
TypeScript icon, indicating that this package has built-in type declarations

2.2.3 • Public • Published

@continuous-auth/client

GitHub Workflow Status GitHub Workflow Status

This module expects to be run in a Supported CI Environment. It infers a lot of variables from environment variables, these config variables are outlined below.

Config

  • CFA_PROJECT_ID - The ID of your project on CFA
  • CFA_SECRET - The secret assoicated with your project on CFA, you get this from the CFA Dashboard

API

getOtp()

Returns Promise<string>.

This promise eventually resolves with a valid OTP code, please be aware that this code is user provided and therefore may have been entered incorrectly. You also need to use OTP codes quite quickly as they typically expire within 30 seconds.

validateConfiguration()

Returns Promise<void>.

This promise will resolve if your project ID and secret are a valid combination for the current CI provider. It will be rejected if they are deemed invalid by the CFA service.

Example

// Publish the package in the CWD with an OTP code from CFA
import { getOtp } from '@continuous-auth/client';
import { spawnSync } from 'child_process';

spawnSync('npm', ['publish', '--otp', await getOtp()])

Readme

Keywords

none

Package Sidebar

Install

npm i @continuous-auth/client

Weekly Downloads

1,468

Version

2.2.3

License

MIT

Unpacked Size

25.4 kB

Total Files

20

Last publish

Collaborators

  • marshallofsound