A JavaScript implementation of the JSON Object Signing and Encryption (JOSE) for current web browsers and node.js-based servers. This library implements (wherever possible) all algorithms, formats, and options in JWS, JWE, JWK, and JWA and uses native cryptographic support (WebCrypto API or node.js' "crypto" module) where feasible. Use this tag for questions regarding node-jose.
Questions tagged [node-jose]
17 questions
5
votes
1 answer
How to verify a JWT signature using Node-jose
I am trying to use node-jose to verify signatures of my JWTs. I know the secret, but am having trouble converting this secret into a JWK used for the verification.
Here is an example of how I am trying to create my key with my secret and verify my…

plum 0
- 652
- 9
- 21
3
votes
0 answers
How to use node-jose with jwt token?
I using jsonwebtoken to get the token using sign method.
I want to encrypt the payload inside the token. so I do it by using node-jose.
createEncrypt give me a token. so now I need to call sign method and pass the token (from createEncrypt) to the…

Jon Sud
- 10,211
- 17
- 76
- 174
3
votes
1 answer
Reliably verify a JWS certificate chain and domain
I'm writing backend code to verify a JWS from Google's SafetyNet API, in Node.JS.
I was surprised to not find a readily available module for this, so I started looking at some simple verification of the JWS using available libraries:
First of all,…

JHH
- 8,567
- 8
- 47
- 91
2
votes
1 answer
Decrypting JWE token in golang
I have this problem, I created a JWE in node.js using node-jose by this way:
const keystore = [
{
kty: 'oct',
kid: 'QLdRkgyMx_po0fPo5XnOzQQB4iTcyay36m_PA62SBiw',
k:…

Jorge Chiquín Valderrama
- 23
- 1
- 5
2
votes
1 answer
How to connect front to back in k8s cluster internal (connection refused)
Error while trying to connect React frontend web to nodejs express api server into kubernetes cluster.
Can navigate in browser to http:localhost:3000 and web site is ok.
But can't navigate to http:localhost:3008 as expected (should not be…

Adolfo Onrubia
- 1,781
- 13
- 22
1
vote
0 answers
How to create JWKs endpoint with pre existing base64 p12 keystore in Nodejs
I am working to create JWKs endpoint for a Nodejs application which can be used by another application to access public key. I only have access to base64 encoded keystore (.p12) and password in application source code.
Found related solutions using…

Rishu Vaid
- 61
- 5
1
vote
1 answer
Unable to verify client_assertion: no key found
I am using the Singpass NdiOidcHelper (@govtechsg/singpass-myinfo-oidc-helper) library to handle Singpass login and token retrieval in my Node.js application. I have defined a keystore object with EC key parameters and used it to create a client…

Ritik Jain
- 21
- 5
1
vote
1 answer
How can I overwrite the automatically calculated kid when importing a JWK from PEM
I am trying to create a JWE Token using the node-jose library's createEncrypt method. The problem is, I want to set the kid to a certain value. But when importing the key using the jose.JWK.asKey method, it's automatically calculating the kid and…

GAURAV KUMAR JHA
- 190
- 1
- 11
1
vote
0 answers
Common secret using ConcatKDH in node-jose
I'm trying to generate a common secret key using ConcatKDF algorithm.
In the following example alice is trying to generate a common secret using bobs public key using node-jose library:
const index = require('node-jose/lib/algorithms/index');
…

Gleb
- 11
- 4
1
vote
0 answers
How to pass claims and expiration time to a JWE?
I am playing with node-jose (https://github.com/cisco/node-jose) and it's not helping much.
Should I wrap a JWE in a JWT payload (or the opposite) maybe?
This is a sample code I am using to make some tests:
const jwe = await…

Victor Ferreira
- 6,151
- 13
- 64
- 120
0
votes
0 answers
"no key found" using node-jose to verify a JWS
I am trying to verify a jws with node-jose, but no matter what I do, I get an Error: no key found.
I believe the issue might come from the fact that my jwks do not have a k parameter. But that is the key I have, I must verify the jws with the key as…
0
votes
0 answers
I am getting issue while decrypting jwt token using node-jose library in Node.js project
In node-jose I am getting below issue while decrypting the jwt token, My encryption is working fine.
Error:
{
2022-06-07 06:58:58,428: "message": "**Algorithm not allowed: undefined**",
2022-06-07 06:58:58,428: "stack": "Error:…

Amit
- 21
- 2
0
votes
0 answers
Node-Jose JWS.CreateSign
I've read all the Promise posts and still can't get this right. No matter what way I write it, I get a " Promise { }". How do I write this statement to get the promise result, not pending.
`let jws = jose.JWS.createSign({ format: 'compact', fields…

ccsrequest
- 1
- 1
0
votes
1 answer
Javascript newbie can't keystore.generate("EC", "P-256")
I'm pretty new to Javascript and Node. Using Jupyter Notebook I ran a subsection of this [SMART HEALTH CARD][1] to generate a key. I just took the "Creating the Signed Health Card" section and ran it in notebook. I get "{ keys: [] }" . When I…

ccsrequest
- 1
- 1
0
votes
0 answers
How to find the JOSE signing key?
My goal is to determine which kid is used to sign a specific payload:
try {
bearerToken = getBearerToken(req.headers);
console.log("token", { bearerToken });
// if the bearerToken is signed by another kid, how do i…

hendry
- 9,725
- 18
- 81
- 139