From 426866daee58f987c58461d1a6857b5cbd207090 Mon Sep 17 00:00:00 2001 From: Laizerox Date: Fri, 9 Apr 2021 12:20:54 +0300 Subject: [PATCH] fix: initial readme version --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..57f1398 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +## Installing + +Using npm: + +```bash +$ npm install ts-wowemu-auth +``` + +Using yarn: + +```bash +$ yarn add ts-wowemu-auth +``` + +## Example for registering new users +In order to register new users we need to generate salt and verifier. + +To acquire new salt for user you will need to create `UserClient` instance and invoked `generateSalt` function. +Salt generation step is very important because verifier generation cannot be executed without it. + +Now you can send salt and verifier to your backend process to complete registration. + +```js +import { UserClient } from 'ts-wowemu-auth' + +const client = new UserClient('username-from-form'); +const salt = client.generateSalt(); +const verifier = client.generateVerifier('password-from-form'); +```