initial
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Thin wrapper around scripts/gen-jwt.py that generates HS256 anon +
|
||||
# service_role JWTs for a given JWT_SECRET. The keys are 10-year, iss=supabase.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/prod/gen-jwt.sh <jwt-secret>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
repo_root="$(cd "${here}/../.." && pwd)"
|
||||
|
||||
secret="${1:-}"
|
||||
if [[ -z "${secret}" ]]; then
|
||||
echo "usage: $0 <jwt-secret>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 "${repo_root}/scripts/gen-jwt.py" "${secret}"
|
||||
Reference in New Issue
Block a user