Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Conversation

StanleyGoldman
Copy link
Contributor

@StanleyGoldman StanleyGoldman commented Apr 12, 2018

Fixes #685

  • Validating the authentication result in order to ensure that we have the username
  • Removing the UpdateToken method because it is never used

throw new InvalidOperationException("Authentication validation failed");
}

keychain.SetToken(host, loginResultData.Token, validateResult.Output[1]);
Copy link
Member

Choose a reason for hiding this comment

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

This is not the only place where the username needs to be set, non-2fa login also needs it. And since we're always setting the user in the credential, why not make the username in SetToken mandatory? We always have it available in some form, and making it mandatory will allow us to make sure it's always sent in.

keychain.SetToken(host, loginResultData.Token);
var octorunTask = new OctorunTask(taskManager.Token, nodeJsExecutablePath.Value, octorunScript.Value, "validate",
user: username, userToken: loginResultData.Token)
.Configure(processManager);
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to run this every time, or only if the username is in email form?

@shana shana merged commit addbcf5 into master Apr 20, 2018
@shana shana deleted the fixes/login-with-email branch April 20, 2018 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants