This repository has been archived on 2024-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
socketio-jwt/lib
ansien12 67cc0fb846
Add a check to make sure provided secret is a string.
```
const JWTOptions: JwtAuthOptions = {
    secret: process.env.JWT_SECRET as string,
    timeout: 5_000,
    decodedPropertyName: 'decodedToken',
};
```

Without the change I made and the options snipped above where the secret is actualy "undefined" because the .env file wasn't loaded yet you get a really weird situation that's very hard to debug. 

With "undefined" used as secret the client will successfully connect and send its "authenticate" event without a problem. But the server will not do anything. No errors, no timeouts, nothing.
2019-07-30 22:00:08 +02:00
..
index.js Add a check to make sure provided secret is a string. 2019-07-30 22:00:08 +02:00
UnauthorizedError.js add data to UnauthorizedError so that more information can be returned to client 2014-07-16 14:12:18 -06:00