chore: clarity to secret key usage
This commit is contained in:
@@ -106,7 +106,7 @@ Here is a list of all properties available to pass through `payload.init`:
|
||||
|
||||
**Required**. This is a secure string that will be used to authenticate with Payload. It can be random but should be at least 14 characters and be very difficult to guess. Often, it's smart to store this value in an `env` and set different values for each of your environments (local, stage, prod, etc). The `dotenv` package is very handy and works well alongside of Payload.
|
||||
|
||||
Payload uses the secret key to generate a secure user token (JWT). Behind the scenes, we first take the secret key and create an encrypted string using the SHA-256 hash function. Then, we reduce the encrypted string to its first 32 characters. This final value gets assigned to the user object as `token`.
|
||||
Payload uses this secret key to generate secure user tokens (JWT). Behind the scenes, we do not use your secret key to encrypt directly - instead, we first take the secret key and create an encrypted string using the SHA-256 hash function. Then, we reduce the encrypted string to its first 32 characters. This final value is what Payload uses for encryption.
|
||||
|
||||
##### `mongoURL`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user