Community-edition: Cannot login to Slack using SSO

Created on 25 Nov 2016  路  8Comments  路  Source: ramboxapp/community-edition

My organization uses single sign-on for Slack exclusively, i.e. I must use SSO to use Slack, and when I open http://myorganization.slack.com there's an SSO button for login, which when I click I get a blank page and cannot login. I'm attaching screenshots below.

Steps to reproduce

  1. Add a Slack account for organization
  2. Click "Sign in with Organization SSO" button

Expected behavior

In a regular browser, when I click the "Sign in with Organization SSO" button, I'm being redirected to a blank company web page which pops up a standard browser user/password dialog box for me to enter my credentials, and then I'm redirected back to Slack. I've put a screenshot at the very bottom of this post.

Actual behavior

In Rambox, when I click the "Sign in with Organization SSO" button, I'm probably still redirected to that blank company web page, but the login dialog box doesn't pop up, so I can't login.

Suggestion for a fix

I see two options:

  1. If I could somehow copy the Slack authentication cookie from my Chrome browser to Rambox, this could solve the issue, as it would bypass the login process inside Rambox. I tried messing with the "Cookies" file in the slack settings in AppData, but without success.
  2. But ideally, Rambox shouldn't block the login dialog box in the first place and let me log in directly.

ENVIRONMENT

Rambox: v0.4.5

OS: Windows 10

Arch: x64


SCREENSHOTS

This is how the Slack login page looks for me.

image



But then I press the SSO button, this is what I get - a blank page with no login popup.

image



And this is how the login web page appears in Chrome:

image

Most helpful comment

@eryshev What I did was to bypass the authentication in Rambox by simply importing the cookies that Slack sets in my browser. That is, I opened Slack in my Chrome browser, then I opened the developer tools window, got all the cookies and pasted them in Rambox's "Custom Code" section in the Slack service settings. The code I currently have there is (with some identifiers stripped out for security):

document.cookie = 'b;expires=Thu, 01 Jan 1970 00:00:00 GMT';
document.cookie = 'b=SOME_RANDOM_GIBBERISH; domain=.slack.com';
document.cookie = 'a-20975202787=MORE_RANDOM_GIBBERISH; domain=.slack.com';
document.cookie = 'a=20975202787; domain=.slack.com';

Now every time I (re)load Rambox, Slack logs in automatically using these cookies and I can use it.

All 8 comments

Yes, SSO in services don't work in Rambox when the service opens a URL in the default browser. If the service is configured to open a popup, works.

I have to find a way to solve this, but for now, I couldn't. Sorry.

There is another issue talking about this, so I will close it.

Hi @saenzramiro,

We still have this issue.
Could you elaborate more this point ?

If the service is configured to open a popup, works.

Could Slack service be configured in a good way or you talking about authentication service???

Or if there is an open issue about it could you point me out to it?
I really like you application but can't use it with my company authentication :(
Thank you.

@eryshev What I did was to bypass the authentication in Rambox by simply importing the cookies that Slack sets in my browser. That is, I opened Slack in my Chrome browser, then I opened the developer tools window, got all the cookies and pasted them in Rambox's "Custom Code" section in the Slack service settings. The code I currently have there is (with some identifiers stripped out for security):

document.cookie = 'b;expires=Thu, 01 Jan 1970 00:00:00 GMT';
document.cookie = 'b=SOME_RANDOM_GIBBERISH; domain=.slack.com';
document.cookie = 'a-20975202787=MORE_RANDOM_GIBBERISH; domain=.slack.com';
document.cookie = 'a=20975202787; domain=.slack.com';

Now every time I (re)load Rambox, Slack logs in automatically using these cookies and I can use it.

Thank you @iliyang, it works!:)
Do you know how long the slack session lasts?
Cookies are valid for a long period of time...

I've been using the same config for months. In fact, maybe even close to a year now!

@iliyang it seems like a long living solution, thank you again :1st_place_medal: I will try to use it with some outlook services now!

Cheers and good luck! Let us know if you find anything interesting along the way :)

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

menzow picture menzow  路  4Comments

andrii-riabchun picture andrii-riabchun  路  3Comments

bnn-y picture bnn-y  路  4Comments

jamy015 picture jamy015  路  4Comments

Tseberechts picture Tseberechts  路  4Comments