Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

SAML #92

Open
Poil opened this issue May 14, 2020 · 5 comments
Open

SAML #92

Poil opened this issue May 14, 2020 · 5 comments

Comments

@Poil
Copy link

Poil commented May 14, 2020

Hi,

It doesn't seem possible to login when your company have SAML integration
Fetch tokens from official Slack app is not working (No Valid Slack tokens found)
Dunno how I can help, or debug ?

I'm on Linux

Best regards,

@zcbenz
Copy link
Member

zcbenz commented May 15, 2020

Can you do npm i keytar @slack/web-api and then run following code in Node.js:

require('keytar').getPassword('Slack', 'tokens').then(console.log)

and do you see a JSON string with token and teamId keys printed?

(Please do not paste your token here.)

And if tokens are printed, can you try running following code to see if the token can be used?

(new (require('@slack/web-api').WebClient)('xoxs-your-token')).auth.test().then(console.log)

@Poil
Copy link
Author

Poil commented May 15, 2020

Hi,

No token/teamId found

require('keytar').getPassword('Slack', 'tokens').then(console.log)
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events:
      [Object: null prototype] {
        removeListener: [Function: updateExceptionCapture],
        newListener: [Function: updateExceptionCapture],
        error: [Function: debugDomainError] },
     _eventsCount: 3,
     _maxListeners: undefined,
     members: [] } }
> null

@zcbenz
Copy link
Member

zcbenz commented May 15, 2020

It seems that slack handles SAML login differently than normal login.

@Poil
Copy link
Author

Poil commented May 15, 2020

Via a webbrowser, I'm able to get the xoxc-********** header and the cookie that contains d=
How keytar works ?

@zcbenz
Copy link
Member

zcbenz commented May 15, 2020

keytar reads from system keychain, it is possible that Slack generates a new token for SAML every time and does not store the token in system keychain.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants