docs: add note about BCrypt hashes

Related: https://github.com/socketio/socket.io-admin-ui/issues/9
This commit is contained in:
Damien Arrachequesne 2021-06-03 11:15:03 +02:00
parent 9428b6bac7
commit 5d92994bca
No known key found for this signature in database
GPG Key ID: 544D14663E7F7CF0
1 changed files with 21 additions and 0 deletions

View File

@ -92,6 +92,27 @@ instrument(io, {
}); });
``` ```
WARNING! Please note that the `bcrypt` package does not currently support hashes starting with the `$2y$` prefix, which is used by some BCrypt implementations (for example https://bcrypt-generator.com/ or https://www.bcrypt.fr/). You can check the validity of the hash with:
```
$ node
> require("bcrypt").compareSync("<the password>", "<the hash>")
true
```
You can generate a valid hash with:
```
$ node
> require("bcrypt").hashSync("changeit", 10)
'$2b$10$LQUE...'
```
See also:
- https://github.com/kelektiv/node.bcrypt.js/issues/849
- https://stackoverflow.com/a/36225192/5138796
#### `namespaceName` #### `namespaceName`
Default value: `/admin` Default value: `/admin`