Move tons of stuff into oldstuff/

This commit is contained in:
2020-06-04 09:54:59 -04:00
parent 49038bb8ef
commit aa1345b6ed
213 changed files with 0 additions and 12 deletions

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -o errexit
main() {
local single_use_token="${1}"
[[ "${single_use_token}" ]] || {
echo "Missing single use token arg"
exit 1
}
[[ "${OOM_CLIENT_ID}" ]] || {
echo "Missing \$OOM_CLIENT_ID"
exit 1
}
[[ "${OOM_CLIENT_SECRET}" ]] || {
echo "Missing \$OOM_CLIENT_SECRET"
exit 1
}
curl \
-X POST \
-sSL \
-d "client_id=${OOM_CLIENT_ID}" \
-d "code=${single_use_token}" \
-d "client_secret=${OOM_CLIENT_SECRET}" \
-d 'redirect_uri=urn:ietf:wg:oauth:2.0:oob' \
-d 'grant_type=authorization_code' \
'https://accounts.google.com/o/oauth2/token'
}
main "$@"