Access token now generating and storing in file

This commit is contained in:
Michael Taboada 2023-01-29 15:53:17 -08:00
parent 77e81a839f
commit 82ee21407d

View File

@ -52,7 +52,7 @@ get_oauth_token() {
echo
read -er oauth_token
# This is actually a authorization token, so get the actual token.
oauth_token="$(curl -sS -d "client_id=${client_id}" -d "client_secret=${client_secret}" -d "code=${oauth_token}" -d "grant_type=authorization_code" "${instanceURL}/oauth/token")"
oauth_token="$(curl -sS -d "client_id=${client_id}" -d "client_secret=${client_secret}" -d "code=${oauth_token}" -d "grant_type=authorization_code" "${instanceURL}/oauth/token" | jq --raw-output '(.access_token)')"
echo "oauth_token=\"${oauth_token}\"" >> "${configPath}/${configFile}"
echo "instanceURL=\"${instanceURL}\"" >> "${configPath}/${configFile}"
}