Skip to content

Commit 64b6f00

Browse files
kenjismichalsn
andauthored
docs: improve explanation
Co-authored-by: Michal Sniatala <michal@sniatala.pl>
1 parent 47546bb commit 64b6f00

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/addons/jwt.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ E.g.:
8282
authjwt.keys.default.0.secret = 8XBFsF6HThIa7OV/bSynahEch+WbKrGcuiJVYPiwqPE=
8383
```
8484

85-
It needs more than 256 bits random string. You can get a secure random string
85+
It needs at least 256 bits random string. The length of the secret depends on the
86+
algorithm we use. The default one is `HS256`, so to ensure that the hash value is
87+
secure and not easily guessable, the secret key should be at least as long as the
88+
hash function's output - 256 bits (32 bytes). You can get a secure random string
8689
with the following command:
8790

8891
```console

0 commit comments

Comments
 (0)