Generates the url, but for some reason it's only showing "read" premission.

This commit is contained in:
stormdragon2976 2023-01-28 15:41:06 -05:00
parent ffd63c98f6
commit 96107693f7

View File

@ -20,7 +20,16 @@ get_oauth_token() {
redirectURI="file://$(realpath ${0})" redirectURI="file://$(realpath ${0})"
# get client id and secret # get client id and secret
curl -s -X POST -d client_name="${softwareName}" -d redirect_uris="://${redirectURI}" "${instanceURL}/api/v1/apps" | curl -s -X POST -d client_name="${softwareName}" -d redirect_uris="://${redirectURI}" "${instanceURL}/api/v1/apps" |
jq 'to_entries | .[] | "export \(.key)='\''\(.value)'\''"' > "${configPath}/${configFile}" jq --raw-output '"client_id=\(.client_id)\nclient_secret=\(.client_secret)"' > "${configPath}/${configFile}"
# Load the new variables from the configuration file
source "${configPath}/${configFile}"
# Create the url to get the oauth token
local url="${instanceURL}/oauth/authorize?client_id=${client_id}&redirect_uri=${redirectURI}&response_type=code&scope=read+write+follow"
echo "Please open the following url in your browser."
echo "Copy the generated token, and paste it here."
echo
echo "${url}"
echo
} }