Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] SAML wasn't working correctly when running multiple instances #10681

Merged
merged 2 commits into from
May 5, 2018

Conversation

Hudell
Copy link
Contributor

@Hudell Hudell commented May 4, 2018

Closes #10436

SAML login result data was previously stored in memory, which caused the login to sometimes fail when using multiple instances of Rocket.Chat. This PR moves this data to mongo to solve this problem.

@Hudell Hudell requested review from geekgonecrazy and rodrigok May 4, 2018 22:08
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10681 May 4, 2018 22:08 Inactive
Accounts.saml.hasCredential = function(credentialToken) {
return _.has(Accounts.saml._loginResultForCredentialToken, credentialToken);
const data = RocketChat.models.CredentialTokens.findOneById(credentialToken);
return Boolean(data);
Copy link
Contributor

Choose a reason for hiding this comment

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

Forgive my momentary ignorance. :) findOneById will return null or undefined here right? No chance of {} or any other result?

@rodrigok rodrigok added this to the 0.64.2 milestone May 5, 2018
@rodrigok rodrigok changed the title [FIX] SAML on multi instances [FIX] SAML wasn't working correctly when running multiple instances May 5, 2018
@rodrigok rodrigok merged commit b2ef99b into develop May 5, 2018
@rodrigok rodrigok deleted the fix.saml-on-multi-instances branch May 5, 2018 15:33
@rodrigok rodrigok mentioned this pull request May 18, 2018
This was referenced May 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants