@smartsoft001/angular 1.2.36 → 1.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -138,6 +138,12 @@ class AuthService {
138
138
  }
139
139
  isAuthenticated() {
140
140
  const token = this.getToken();
141
+ if (!token)
142
+ return false;
143
+ const tokenPayload = decode(token.access_token);
144
+ if (Date.now() >= tokenPayload.exp * 1000) {
145
+ return false;
146
+ }
141
147
  return !!token;
142
148
  }
143
149
  expectPermissions(permissions) {