-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
``` |