JWTSecretGen is a tool written in Go for generating JSON Web Token (JWT) secrets securely.
To generate a JWT secret, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/nakinami/JWTSecretGen.git
-
Navigate to the directory containing the Go script:
cd JWTSecretGen
-
Run the Go script:
go run jwt.go
-
The generated JWT secret is encoded using base64.URLEncoding. Make sure to store it securely and never expose it in plaintext.
-
You can adjust the length of the secret by modifying the
secretLength
variable in thegenerateJWTSecret
function. The default length is 64 bytes. -
Ensure that you have Go installed on your machine before running the script. You can download and install Go from the official website.