Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Get team_token from the RTS on login #676

Merged
merged 5 commits into from
Feb 8, 2017
Merged

Conversation

lukebarnard1
Copy link
Contributor

Use the /login endpoint of the RTS to get the team token when the user has successfully logged in.

Luke Barnard added 3 commits February 3, 2017 14:34
Use the /login endpoint of the RTS to get the team token when the user has successfully logged in.
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

It's a shame that this makes it even easier to discover the team token for a team. In future what we could do is store the team token in user account data.

src/Lifecycle.js Outdated
@@ -228,6 +228,11 @@ function _restoreFromLocalStorage() {
return false;
}
}
const RtsClient = require("./RtsClient");
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be at the top as an import?

@@ -210,6 +210,8 @@ module.exports = React.createClass({
window.addEventListener('resize', this.handleResize);
this.handleResize();

Lifecycle.initRtsClient(this.props.config.teamServerConfig.teamServerURL);
Copy link
Member

Choose a reason for hiding this comment

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

Does this want to be done conditionally on there being a team server URL, as otherwise it looks like we'll always be creating a client but with an undefined URL.

@lukebarnard1
Copy link
Contributor Author

lukebarnard1 commented Feb 8, 2017

Yes, if we want to be serious about isolating teams in a secure way then we'd need to support it from account data.

@dbkr dbkr merged commit fe17e24 into develop Feb 8, 2017
@lukebarnard1 lukebarnard1 deleted the luke/rts-team-token-login branch February 8, 2017 10:55
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.

2 participants