Skip to content

Instantly share code, notes, and snippets.

@golgotow
golgotow / mk-jwt-token
Created June 11, 2022 04:01 — forked from briceburg/mk-jwt-token
mk-jwt-token -- bash shell script for generating JWT tokens. requires `openssl` and `base64` which you have.
#!/usr/bin/env bash
#
# usage: JWT_SECRET="silly" mk-jwt-token
# @WARN: modify the payload and header to your needs.
#
main(){
set -eo pipefail
[ -n "$JWT_SECRET" ] || die "JWT_SECRET environment variable is not set."