oidc: add alg to the jwks keys
This commit is contained in:
@@ -528,7 +528,7 @@ async function start() {
|
||||
if (!keyEdDsa) {
|
||||
debug('Generating new OIDC EdDSA key');
|
||||
const { privateKey } = await jose.generateKeyPair('EdDSA', { extractable: true });
|
||||
keyEdDsa = await jose.exportJWK(privateKey);
|
||||
keyEdDsa = Object.assign(await jose.exportJWK(privateKey), { alg: 'EdDSA' }); // alg is optional, but wp requires it
|
||||
await blobs.setString(blobs.OIDC_KEY_EDDSA, JSON.stringify(keyEdDsa));
|
||||
jwksKeys.push(keyEdDsa);
|
||||
} else {
|
||||
@@ -540,7 +540,7 @@ async function start() {
|
||||
if (!keyRs256) {
|
||||
debug('Generating new OIDC RS256 key');
|
||||
const { privateKey } = await jose.generateKeyPair('RS256', { extractable: true });
|
||||
keyRs256 = await jose.exportJWK(privateKey);
|
||||
keyRs256 = Object.assign(await jose.exportJWK(privateKey), { alg: 'RS256' }); // alg is optional, but wp requires it
|
||||
await blobs.setString(blobs.OIDC_KEY_RS256, JSON.stringify(keyRs256));
|
||||
jwksKeys.push(keyRs256);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user