Skip to content

Update signedAuthToken when invoke setAuthToken#30

Closed
BojDom wants to merge 1 commit into
SocketCluster:masterfrom
BojDom:patch-1
Closed

Update signedAuthToken when invoke setAuthToken#30
BojDom wants to merge 1 commit into
SocketCluster:masterfrom
BojDom:patch-1

Conversation

@BojDom

@BojDom BojDom commented Jul 27, 2018

Copy link
Copy Markdown

No description provided.

Comment thread scserversocket.js
var tokenData = {
token: signedToken
};
self.signedAuthToken = signedToken

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This part of the code could potentially be executed asynchronously, that means that it's possible that the socket.authToken could have been unset (or changed) while the original token was being still being signed. So it's good to add an extra if statement to check this. Also, missing semicolon.

@jondubois

jondubois commented Sep 19, 2018

Copy link
Copy Markdown
Member

Thanks for raising this issue and proposing a fix. I've made the complete fix.

@jondubois jondubois closed this Sep 19, 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.

2 participants