Validates a given token for your account.
The current routes are:
# generate and configure new TOTP
POST /token
# check google-authenticator token against the secret on the server
GET /token/check/:token
Download the latest release of guardian
See .env.sample to see what env vars you need to set. After setting those env vars, just run:
bin/guardian
- Download your TOTP key credential
curl -XPOST -u user:pass -o guardian.html http://localhost:9222/token -d"issuer=stark.inc&[email protected]"
-
open the downloaded file
guardian.html
in your favorite browser and you should see: -
Open your
google-authenticator
and point the app to the generated QRCode -
Your guardian server is now configured with the generated secret in your
guardian.html
file -
To check the token generated by
google-authenticator
app justcurl
the url:
curl -u user:pass http://localhost:9222/token/check/GENERATED_TOKEN
# response
{
"Valid": true,
}