Move the redirect uri to a variable.

This commit is contained in:
stormdragon2976 2023-01-29 03:50:23 -05:00
parent a8f0d6eee3
commit 5cea37fe56

View File

@ -15,9 +15,9 @@ get_oauth_token() {
instanceURL="https://${instanceURL}" instanceURL="https://${instanceURL}"
fi fi
done done
redirectURI="file://$(realpath ${0})" redirectURI="https://billy.wolfe.casa/ratatoskr-success.html"
# get client id and secret # get client id and secret
curl -s -X POST -d client_name="${softwareName}" -d "redirect_uris=https://billy.wolfe.casa/ratatoskr-success.html" -d "scopes=read write follow push" -d "website=https://git.stormux.org/storm/ratatoskr" "${instanceURL}/api/v1/apps" | curl -s -X POST -d client_name="${softwareName}" -d "redirect_uris=${redirectURI}" -d "scopes=read write follow push" -d "website=https://git.stormux.org/storm/ratatoskr" "${instanceURL}/api/v1/apps" |
jq --raw-output '"client_id=\"\(.client_id)\"\nclient_secret=\"\(.client_secret)\""' > "${configPath}/${configFile}" jq --raw-output '"client_id=\"\(.client_id)\"\nclient_secret=\"\(.client_secret)\""' > "${configPath}/${configFile}"
# Load the new variables from the configuration file # Load the new variables from the configuration file
source "${configPath}/${configFile}" source "${configPath}/${configFile}"