Skip to content

Commit 52ae848

Browse files
committed
refactor(eb-app-api): sync token.ts
1 parent 2729b2c commit 52ae848

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • machines/eb-app-api/home/api/galaxy/lib/common

machines/eb-app-api/home/api/galaxy/lib/common/token.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ async function generateCryptoKeyRS(
124124
pemHeader.length,
125125
privateKey.length - pemFooter.length,
126126
);
127-
const binaryDer = decodeBase64(pemContents);
127+
const pemStr = pemContents.replace(/\n/g, "");
128+
const binaryDer = decodeBase64(pemStr);
128129
const cryptoKey = await crypto.subtle.importKey(
129130
"pkcs8",
130131
binaryDer,

0 commit comments

Comments
 (0)