This SDK provides JavaScript client API to the Prove's authentication platform Prove Auth.
- Make sure you have Node JS, npm, TypeScript installed:
- Install node, preferably using nvm, current stable version is v20.2.0
- Make sure to uninstall any old version on TypeScript compiler -
npm uninstall tpc
- Install TypeScript
npm install typescript
- Build the project from your IDE or CLI -
npm run build
- Build the sdk first, then build the sample code:
- Build SDK web bundle -
npm run clean && npm run build && npm run bundle-dev
- Build and start sample code -
cd samples/basic; npm run build && npm run serve
- Build SDK web bundle -
This project provides several options for running unit tests. Follow these instructions to execute the tests:
To run the standard test suite:
npm test
This command will execute all unit tests and display the results in your default web browser.
If you need to run tests in a Node.js environment:
npm run test-with-node
This command will execute all unit tests and display the results in your terminal.
To run integration tests using Test Runner:
npm run test-runner
This command uses Test Runner client to execute integration tests enabled for the Web SDK.
Execution of integration tests depends on the Test Runner server components, which are part of
(Garfield backend service)[https://gitlab.com/prove-identity/prove-auth/garfield], and must be
started in advance using make test-localhost-up
command in that repo.