1.3.0 • Published 2 months ago

@vonage/auth-client-sdk v1.3.0

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

Auth client SDK

Auth client SDK is built to formalize and normalize various client side operations regarding the auth logic, like verifying user being logged in, token operations etc.

SDK is served from Vonage's CDN. Its APIs to be imported directly over the network, for example:

import { VBCAuthVault } from 'https://sdk.auth.vonage.com/1.2.3/main.js';

or, less preferred, as an import from local node_modules:

  • first do npm i @vonage/auth-client-sdk
  • then import similar to above, just using your relative paths structure

CI/CD

CI

CI verification will run on any PR opened against develop branch.

CD

CD process is tightly coupled with the overall SDK's architecture.

SDK, is a 2nd party library. Yet, specifics of it require at least some of its parts to be served from CDN.

Thus SDK is being deployed to CDN anyhow and can be consumed via static/dynamic https import like an examples above. This is the most preferred and safest way to use SDK.

In some cases, WebPack stuff, it is not going to work, so the exact symmetric version of SDK is also published to npm and can be consumed from the node_modules. Note, that even in this case some parts of SDK will be pulled over the network.

Vault

Vault part of SDK allows to securily store key/value pairs.

The values will be stored under auth own domain, which in turn will only be allowed to load from a narrow list of allowed consuming domains.

For a full usage example see this snippet.

VBCAuthVault

VBCAuthVault {
	static getInstance(env: string): VBCAuthVault;

	store(key: string, value: string): Promise<VaultMessage>;
	retrieve(key: string): Promise<VaultMessage>;
	remove(key: string): Promise<VaultMessage>;
}

env parameter of getInstance MUST be one of those: DEV, QA or PROD.

VaultMessage

VaultMessage {
	key: string;
	value: string | null;
	error: string | null;
}
  • key of the requested operation
  • value in case of retrieve, else null
  • error in case of any error, else null
1.3.0

2 months ago

1.2.12

11 months ago

1.2.10

12 months ago

1.2.11

12 months ago

1.2.9

12 months ago

1.2.8

12 months ago

1.2.7

12 months ago

1.2.6

12 months ago

1.2.5

12 months ago

1.2.4

12 months ago

1.0.0

12 months ago