(kid: string)
| 46 | } |
| 47 | |
| 48 | const generateKeypair = async (kid: string): Promise<Keypair> => { |
| 49 | const { publicKey, privateKey } = await generateKeyPair("RS256"); |
| 50 | const jwk = await exportJWK(publicKey); |
| 51 | return { kid, publicJwk: { ...jwk, kid, alg: "RS256" }, privateKey }; |
| 52 | }; |
| 53 | |
| 54 | const signAccessToken = ( |
| 55 | keypair: Keypair, |