Found the documentation to get the token without having a redirect rui that is a website.
This commit is contained in:
parent
a55ce4db79
commit
d419435462
@ -1,30 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Ratatoskr success!</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Authorized successfully</h1>
|
||||
<p>
|
||||
Please copy and paste this code into your waiting Ratatoskr:
|
||||
</p>
|
||||
<div id="code-div"><noscript>Sorry, but this webpage requires javascript. As a workaround, you can extract the code parameter from the url.</noscript></div>
|
||||
<script type="text/javascript">
|
||||
function getQueryParams(qs) {
|
||||
qs = qs.split('+').join(' ');
|
||||
|
||||
var params = {},
|
||||
tokens,
|
||||
re = /[?&]?([^=]+)=([^&]*)/g;
|
||||
|
||||
while (tokens = re.exec(qs)) {
|
||||
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
var query = getQueryParams(document.location.search);
|
||||
document.getElementById("code-div").innerHTML = "<p>" + query.code + "</p>";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -31,7 +31,7 @@ get_oauth_token() {
|
||||
instanceURL="https://${instanceURL}"
|
||||
fi
|
||||
done
|
||||
redirectURI="https://billy.wolfe.casa/ratatoskr-success.html"
|
||||
redirectURI="urn:ietf:wg:oauth:2.0:oob"
|
||||
website="https://git.stormux.org/storm/ratatoskr"
|
||||
# get client id and secret
|
||||
curl -s -X POST -d client_name="${softwareName}" -d "redirect_uris=${redirectURI}" -d "scopes=read write follow push" -d "website=${website}" "${instanceURL}/api/v1/apps" |
|
||||
|
Loading…
Reference in New Issue
Block a user