Merge pull request #66 from gjsmith66/gjsmith66-patch-1

Update README.md
This commit is contained in:
José F. Romaniello 2016-06-21 14:48:07 +02:00 committed by GitHub
commit 5a5cd7c45a

View File

@ -95,8 +95,8 @@ Your client-side code should handle it as below.
__Client side__:
```javascript
socket.on("error", function(error) {
if (error.type == "UnauthorizedError" || error.code == "invalid_token") {
socket.on("unauthorized", function(error) {
if (error.data.type == "UnauthorizedError" || error.data.code == "invalid_token") {
// redirect user to login page perhaps?
console.log("User's token has expired");
}