Skip to content

Commit 2c8e2c0

Browse files
committed
chore(demo): fix usage of demo
1 parent 3ff781d commit 2c8e2c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

demo/mockserver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ app.post('/api/authenticate', (req: Request, res: Response) => {
5050
}
5151
});
5252

53-
app.get('/api/user', expressJwt({ secret: JWTSecret }), (req: Request, res: Response) => {
53+
app.get('/api/user', expressJwt({ secret: JWTSecret, algorithms: ['RS256'] }), (req: Request, res: Response) => {
5454
res.send(USER_INFO);
5555
});
5656

57-
app.get('/api/check', expressJwt({ secret: JWTSecret }), (req: Request, res: Response) => {
57+
app.get('/api/check', expressJwt({ secret: JWTSecret, algorithms: ['RS256'] }), (req: Request, res: Response) => {
5858
res.send('OK!');
5959
});
6060

61-
app.get('/api/refresh', expressJwt({ secret: JWTSecret }), (req: Request, res: Response) => {
61+
app.get('/api/refresh', expressJwt({ secret: JWTSecret, algorithms: ['RS256'] }), (req: Request, res: Response) => {
6262
const token = generateToken();
6363
res
6464
.set('Authorization', `Bearer ${token}`)

demo/src/plugins/vue-auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Vue.use(VueAuth, {
2424
fetchUser: true,
2525
fetchData: (response) => response.data.userInfo,
2626
},
27-
logoutData: { redirect: '/user' },
27+
logoutData: { redirect: '/login' },
2828
fetchData: { url: '/api/user', method: 'GET', interval: 30, enabled: true },
2929
refreshData: { url: '/api/refresh', method: 'GET', interval: 30, enabled: true },
3030
});

0 commit comments

Comments
 (0)