Skip to content

Commit 499daf8

Browse files
authored
Merge pull request #858 from jsonwebtoken/jt/fix-key-information-message
Fix signing errors when there is no header
2 parents 9dca083 + 6961386 commit 499daf8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/features/encoder/services/token-encoder.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,9 @@ class _TokenEncoderService {
11321132
payload: params.payload,
11331133
payloadErrors: null,
11341134
encodingWarnings: null,
1135-
signingErrors: null,
1135+
signingErrors: params.header ? null : [
1136+
"Fix any errors in the JWT header to enable editing this field.",
1137+
],
11361138
};
11371139

11381140
const processPayloadResult = this.processPayload({

0 commit comments

Comments
 (0)