extract cookie as well as token for slack auth #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
Welp, Slack is cracking down. The days of using tokens for whatever the heck you want are over, now we need cookies too. I used to love cookies, ya know?
Anyway, as part of the response to jackellenberger/emojme#60, we need an easy way to extract both a slack token and its cooperative cookie, which is
wiselyunfortunately, HttpOnly. This means we can't just grab it in javascript, you need a them on the inside... a them like... google chrome. So here this extension is, requesting more permissions to do more seemingly nefarious but really quite silly things.What
The actual change here (in addition to adding
cookies
permissions, is to update theGet Slack Token
button to be aGet Slack Token and Cookie
button. Clicking it will return (and copy to your clipboard) a jsonblob containing the slack subdomain, token, and cookie.What's next
Update emojme to accept these auth blobs so emoji shenanigans remains a bada bing bada boom type operation, nice and easy. :promoves: