Skip to content

Commit

Permalink
fix: initial readme version
Browse files Browse the repository at this point in the history
  • Loading branch information
Laizerox committed Apr 9, 2021
1 parent 3ea1bf3 commit 426866d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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');
```

0 comments on commit 426866d

Please sign in to comment.