Skip to content

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.

5 participants