diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-05-05 22:23:46 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-05-05 23:55:15 +0200 |
commit | 8379f8a5ee270625afd3ac427ed8ee7f03ac2501 (patch) | |
tree | 66276d7914f3a68eed90f8dda92c56dc4e921667 /docs | |
parent | 5d27e9066bff8083326fe84877b50f2940d051de (diff) | |
download | wee-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')
-rw-r--r-- | docs/Commands.md | 6 | ||||
-rw-r--r-- | docs/oauth.html | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/docs/Commands.md b/docs/Commands.md index ce5240e..8ba5dc3 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -95,13 +95,17 @@ Hide or unhide all channels marked as distracting. ### register ``` -/slack register [code/token] +/slack register [-nothirdparty] [code/token] ``` Register a Slack team in wee-slack. Call this without any arguments and follow the instructions to register a new team. If you already have a token for a team, you can call this with that token to add it. +By default GitHub Pages will see a temporary code used to create your token +(but not the token itself). If you're worried about this, you can use the +-nothirdparty option, though the process will be a bit less user friendly. + ### rehistory ``` 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 { |