Skip to content

Commit 884e386

Browse files
fix(PoPToken): Fix handling case of missing cnf key in inner access token
1 parent 4463844 commit 884e386

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PoPToken.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ class PoPToken {
171171
* @returns {Promise}
172172
*/
173173
importConfirmationKey () {
174-
let cnfJwk = this.accessToken.jwt.payload.cnf.jwk
174+
let cnfJwk = this.accessToken.jwt.payload.cnf &&
175+
this.accessToken.jwt.payload.cnf.jwk
175176

176177
if (!cnfJwk) {
177178
return Promise.reject(new UnauthorizedError({

0 commit comments

Comments
 (0)