use proper token params
This commit is contained in:
parent
5f1191a6b9
commit
1e9618f5ec
|
@ -202,7 +202,7 @@ function verifyToken(token) {
|
||||||
try {
|
try {
|
||||||
return jwt.verify(token, require('jwk-to-pem')(res.data), opts);
|
return jwt.verify(token, require('jwk-to-pem')(res.data), opts);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if ('TokenExpiredError' === err.code) {
|
if ('TokenExpiredError' === err.name) {
|
||||||
return PromiseA.reject({
|
return PromiseA.reject({
|
||||||
message: 'TokenExpiredError: jwt expired'
|
message: 'TokenExpiredError: jwt expired'
|
||||||
, code: 'E_TOKEN_EXPIRED'
|
, code: 'E_TOKEN_EXPIRED'
|
||||||
|
|
Loading…
Reference in New Issue