Instead of sending userId, userEmail, send sid, client_secret
This has the benefit of being possible from the _second_ riot instance, which may not actually have the email of the user registering. With these parameters, the RTS can get the email and user ID itself. (see https://github.com/matrix-org/riot-team-server/pull/15)
This commit is contained in:
parent
a5a43bcd93
commit
29f5e88f6a
2 changed files with 12 additions and 9 deletions
|
@ -213,16 +213,19 @@ module.exports = React.createClass({
|
|||
accessToken: response.access_token
|
||||
});
|
||||
|
||||
// Done regardless of `teamSelected`. People registering with non-team emails
|
||||
// will just nop. The point of this being we might not have the email address
|
||||
// that the user registered with at this stage (depending on whether this
|
||||
// is the client they initiated registration).
|
||||
if (
|
||||
self._rtsClient &&
|
||||
self.props.referrer &&
|
||||
self.state.teamSelected
|
||||
self.props.referrer
|
||||
) {
|
||||
// Track referral, get team_token in order to retrieve team config
|
||||
self._rtsClient.trackReferral(
|
||||
self.props.referrer,
|
||||
response.user_id,
|
||||
self.state.formVals.email
|
||||
self.registerLogic.params.idSid,
|
||||
self.registerLogic.params.clientSecret
|
||||
).then((data) => {
|
||||
const teamToken = data.team_token;
|
||||
// Store for use /w welcome pages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue