SSO login broken when following a shared link?

I’ve set up SSO for my Discourse instance at my company, so that users can log in with Windows authentication against our internal Active Directory. This has worked fine so far.

What I noticed today is that when I email a link to people which is a shared link from a topic I created, there are problems logging in if they followed that link.

Here are some relevant pieces of info:

Root URL: http://{computer_name}
Shared link: http://{computer_name}/t/expand-code-n-lines/278?u=kmckinney

When I click Login, my browser URL reflects this, but doesn’t log me in.

http://{computer_name}/t/expand-code-n-lines/278?u=kmckinney/session/sso_login?sso={sso_payload}

If I then go to the root URL for the site, I’m able to log in without a problem, and then I can follow the link and view the post as a logged in user.

Please let me know if there is more info that I should provide. Thanks!

@techapj can we repro this on a customer that uses SSO?

Not able to repro this on http://forums.gearboxsoftware.com

I realized what the issue was, and it is not an issue with Discourse. My hacked-together SSO provider site (so users could authenticate against our internal Active Directory) was redirecting incorrectly. :flushed:

3 Likes