You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After phone auth from firebase I got idToken from it that is a JWT as according to my R&D and I want to convert it into JWE but all my tries are failed. I am trying React JS. Here is my code. I also tried in Express JS but same error faced. Kindly guide me where I am wrong. I have used Node-Jose for my tries.
`const createJWE = async () => {
// Payload to be included in the JWT
const payload = {
idToken: 'token',
};
try {
// Sign the JWT
const jwt = await jose.JWS.createSign({ format: 'compact' }, { key: rsaPublicKey }).update(JSON.stringify(payload)).final();
// Encrypt the JWT to create a JWE
const jwe = await jose.JWE.createEncrypt({ format: 'compact' }, { key: rsaPublicKey }).update(jwt).final();
console.log(jwe);
} catch (error) {
console.error('JWE Creation Error:', error);
}
}
createJWE();`
The text was updated successfully, but these errors were encountered:
After phone auth from firebase I got idToken from it that is a JWT as according to my R&D and I want to convert it into JWE but all my tries are failed. I am trying React JS. Here is my code. I also tried in Express JS but same error faced. Kindly guide me where I am wrong. I have used Node-Jose for my tries.
`const createJWE = async () => {
// Payload to be included in the JWT
const payload = {
idToken: 'token',
};
try {
// Sign the JWT
const jwt = await jose.JWS.createSign({ format: 'compact' }, { key: rsaPublicKey }).update(JSON.stringify(payload)).final();
}
createJWE();`
The text was updated successfully, but these errors were encountered: