adsr/irslackd

`xoxc` tokens not working

pigmej opened this issue · 10 comments

Description
Some of my slack workspaces are having xo-xc tokens

Steps to reproduce

  1. Workspace with xo-xc tokens
  2. Try to use gateway

Expected behavior
Everything works fine

Log output

Trace: irslackd_err Failed onIrcUser: Error: {
  "method": "auth.test",
  "error": {
    "code": "slackclient_platform_error",
    "data": {
      "ok": false,
      "error": "invalid_auth"
    }
  }
}

Client setup

  • IRC client and version: any
  • IRC bouncer and version (if any): ZNC 1.7.1
  • OS: Linux
adsr commented

Thanks for the report @pigmej. Slack docs[0] do not mention xoxc- tokens. I'll email them.

[0] https://api.slack.com/docs/token-types

adsr commented

Hi @pigmej I'm in touch with Slack support. Did you get the token via the steps in the readme? They claim they don't issue xoxc- tokens via oauth.access...

@adsr actually not, I can't get OAuth tokens in some namespaces. I've taken them from the web browser. (Ripcord supports that method and it works).

I can't use also legacy tokens because then it will display that the token does not support the given feature.

adsr commented

Ah I see. I've emailed Slack support and the author of Ripcord. Maybe one of them can help explain.

@adsr any answers?

adsr commented

Hi @pigmej Slack support says xoxc- tokens are unsupported, and that they cannot comment on what Ripcord is doing. I did not hear back from the author of Ripcord. I'll keep asking around.

adsr commented

I was able to get in touch with the author of Ripcord. I will try to implement this soon.

adsr commented

e295ac5 adds support for xoxc- tokens. I tested basic functionality. It seems to work on the irslackd workspace. See the wiki for instructions on how to use xoxc tokens:

https://github.com/adsr/irslackd/wiki/IRC-Client-Config#xoxc-tokens

Please let me know if it works if you end up using this feature.

Hi.

I make a similar tool (https://github.com/ltworf/localslackirc/) but your guide didn't work for me.

I solved it by passing the same cookies in the request, along with the xoxc token with 'Authorization': f'Bearer {self.token}'.

Perhaps this information can be useful to you. I found myself having to use a slack with such a token and had to struggle a bit to make my gateway work with it.

adsr commented

Thanks @ltworf. I opened #91 to track that.