aboutsummaryrefslogtreecommitdiffstats
path: root/docs/oauth.html
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-05-05 22:23:46 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2020-05-05 23:55:15 +0200
commit8379f8a5ee270625afd3ac427ed8ee7f03ac2501 (patch)
tree66276d7914f3a68eed90f8dda92c56dc4e921667 /docs/oauth.html
parent5d27e9066bff8083326fe84877b50f2940d051de (diff)
downloadwee-slack-8379f8a5ee270625afd3ac427ed8ee7f03ac2501.tar.gz
Fix /slack register not working after API change
Slack now disallows # in OAuth redirect uris, so we can't use it to prevent GitHub Pages from seeing the OAuth code anymore. Since the OAuth code is only valid once and expire after 10 minutes, I don't think it's a problem that they are exposed to GitHub Pages, so this is the new default so the same registration process can be kept. However, for people worried about this, there's a new -nothirdparty option to /slack register which can be used which doesn't expose the code. Fixes #766
Diffstat (limited to 'docs/oauth.html')
-rw-r--r--docs/oauth.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/oauth.html b/docs/oauth.html
index 7ef4d99..3490bbb 100644
--- a/docs/oauth.html
+++ b/docs/oauth.html
@@ -16,15 +16,15 @@
</style>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
- var locationsHash = location.hash
- .replace(/^#\?/, '')
+ var locationsSearch = location.search
+ .replace(/^\?/, '')
.split('&')
.reduce((obj, query) => {
split = query.split('=');
obj[split[0]] = split[1];
return obj}, {}
)
- var code = locationsHash['code'];
+ var code = locationsSearch['code'];
if (code) {
document.getElementById('with-code').style.display = 'block';
} else {