Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

fix: don't send cookies if we have an access token - #288

Merged
ijsnow merged 1 commit into
masterfrom
401-saml-token
Oct 30, 2018
Merged

ijsnow merged 1 commit into
masterfrom
401-saml-token

Conversation

@ijsnow

@ijsnow ijsnow commented Oct 30, 2018

Copy link
Copy Markdown

Addresses https://github.com/sourcegraph/sourcegraph/issues/545

This PR fixes an error where we get 401s even though we have an access token. This can happen when using SAML auth and the SAML session expires. This is because Sourcegraph gets to the SAML auth provider before the access token which will respond with a 401 and stop the execution of other auth middlewares. The solution is to not send cookies if we have an access token.

@chrismwendt do we need to do this for anything with extensions? I tested with the go language server enabled through extensions and it seems to work but just want to make sure.

@chrismwendt chrismwendt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I don't think extensions need any special casing

@ijsnow
ijsnow merged commit 7ae84fd into master Oct 30, 2018
@ijsnow
ijsnow deleted the 401-saml-token branch October 30, 2018 05:47
ijsnow added a commit to sourcegraph/sourcegraph-public-snapshot that referenced this pull request Oct 30, 2018
@sourcegraph-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants