non-extractable CryptoKey cannot be exported as JWK
[15:13:03.504] INFO (91760):
request: {
"method": "GET",
"url": "http://localhost:3000/api/auth/get-session",
"referrer": "http://localhost:5173/"
}
responseTime: 19.685371000000487
# SERVER_ERROR: 11 | }
12 | if (!isCryptoKey(key)) {
13 | throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array'));
14 | }
15 | if (!key.extractable) {
16 | throw new TypeError('non-extractable CryptoKey cannot be exported as a JWK');
^
TypeError: non-extractable CryptoKey cannot be exported as a JWK
at <anonymous> (redacted/node_modules/better-auth/node_modules/jose/dist/browser/runtime/key_to_jwk.js:16:15)
at keyToJWK (redacted/node_modules/better-auth/node_modules/jose/dist/browser/runtime/key_to_jwk.js:5:25)
at exportJWK (redacted/nexus-kit/node_modules/better-auth/node_modules/jose/dist/browser/key/export.js:10:33)
at getJwtToken (redacted/node_modules/better-auth/dist/plugins/jwt/index.mjs:82:34)
[15:13:03.504] INFO (91760):
request: {
"method": "GET",
"url": "http://localhost:3000/api/auth/get-session",
"referrer": "http://localhost:5173/"
}
responseTime: 19.685371000000487
# SERVER_ERROR: 11 | }
12 | if (!isCryptoKey(key)) {
13 | throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array'));
14 | }
15 | if (!key.extractable) {
16 | throw new TypeError('non-extractable CryptoKey cannot be exported as a JWK');
^
TypeError: non-extractable CryptoKey cannot be exported as a JWK
at <anonymous> (redacted/node_modules/better-auth/node_modules/jose/dist/browser/runtime/key_to_jwk.js:16:15)
at keyToJWK (redacted/node_modules/better-auth/node_modules/jose/dist/browser/runtime/key_to_jwk.js:5:25)
at exportJWK (redacted/nexus-kit/node_modules/better-auth/node_modules/jose/dist/browser/key/export.js:10:33)
at getJwtToken (redacted/node_modules/better-auth/dist/plugins/jwt/index.mjs:82:34)
0 Replies