· 8 years ago · Feb 01, 2018, 07:30 PM
1axios({
2 method: 'POST',
3 url: '/verify',
4 headers: { authorization: sessionStorage.getItem('token') },
5 data: {}
6 })
7 .then(function(response) {
8 // ...
9 });
10
11@app.route('/verify', methods=['POST'])
12def verify_user():
13 token = request.headers.get('Authorization')
14 payload = jwt.decode(token, SECRET_KEY) // error here
15 // ...
16
17Traceback (most recent call last):
18........
19jwt.exceptions.DecodeError: Signature verification failed