Skip to content

Commit be5b934

Browse files
committed
fix invalid token validation
1 parent d388164 commit be5b934

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ yarn
5858
## Quick start
5959
Run development server
6060
```shell
61-
yarn run serve
61+
yarn run start
6262
```
6363

6464
### If you use app with backend support, please use
6565
```
66-
yarn run serve:backend
66+
yarn run start:backend
6767
```
6868

6969
## Support

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [3.1.4]
4+
5+
### Fixed
6+
7+
- Fix invalid token validation
8+
39
## [3.1.3]
410

511
### Fixed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
6-
"serve": "vue-cli-service serve --port 3000",
7-
"serve:backend": "VUE_APP_BACKEND=true vue-cli-service serve --port 3000",
6+
"start": "vue-cli-service serve --port 3000",
7+
"start:backend": "VUE_APP_BACKEND=true vue-cli-service serve --port 3000",
88
"build": "VUE_APP_BACKEND=true vue-cli-service build",
99
"lint": "vue-cli-service lint",
10-
"start": "node server.js"
10+
"node": "node server.js"
1111
},
1212
"dependencies": {
1313
"@amcharts/amcharts4": "^4.6.1",

src/documentation/pages/getting-started/QuickStart.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<h5>Quick Start:</h5>
1414
<ol>
1515
<li>1. Run <code>yarn install</code></li>
16-
<li>2. Run <code>yarn serve</code></li>
17-
<li>2.1 For running the app with backend support please run <code>yarn serve:backend</code>
16+
<li>2. Run <code>yarn start</code></li>
17+
<li>2.1 For running the app with backend support please run <code>yarn start:backend</code>
1818
<span class="small text-muted"> (Required only in full stack version)</span>
1919
</li>
2020
</ol>

src/mixins/auth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ export function isAuthenticated(token) {
77
if (!token) return;
88
const date = new Date().getTime() / 1000;
99
const data = jwt.decode(token);
10+
if (!data) return;
1011
return date < data.exp;
1112
}
1213

1314
export const AuthMixin = {
1415
methods: {
1516
isAuthenticated
1617
}
17-
};
18+
};

0 commit comments

Comments
 (0)