Demo of generating a JWT and authenticating with Ghost's Admin API.
- Save
ghost-auth.sh
locally - With Ghost running on localhost:2368
sh ghost-auth.sh {admin api key}
to run
Bash designed for running on mac os - linux/unix users may need to change line 21 to:
printf '%s' "${input}" | base64 -w0 | tr -d '=' | tr '+' '-' | tr '/' '_'
Designed to authenticate with a local install, change the last line if your Ghost install is elsewhere
@ErisDS Is this functionality built into ghost?
I should be able to call a ghost api endpoint with my admin key and have this JWT value returned