We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42c13e2 commit 976369dCopy full SHA for 976369d
packages/authentication/src/jwt.ts
@@ -32,8 +32,10 @@ export class JWTStrategy extends AuthenticationBaseStrategy {
32
const isValidLogout = event === 'logout' && connection.authentication && authResult &&
33
connection.authentication.accessToken === authResult.accessToken;
34
35
- if (authResult && event === 'login') {
36
- const { accessToken } = authResult;
+ const { accessToken } = authResult || {};
+
37
+ if (accessToken && event === 'login') {
38
+ debug('Adding authentication information to connection');
39
const { exp } = await this.authentication.verifyAccessToken(accessToken);
40
// The time (in ms) until the token expires
41
const duration = (exp * 1000) - new Date().getTime();
0 commit comments