@othent/kms-unbundled
Version:
Arweave Oauth Othent wallets enabled Google Key Management Service.
12 lines (10 loc) • 362 B
text/typescript
import { getAuth0Client, getTokenSilently } from "./auth0";
export async function getJWT(): Promise<string> {
const auth0 = await getAuth0Client();
const authParams = {
transaction_input: JSON.stringify({ othentFunction: "KMS" }),
};
const accessToken = await getTokenSilently(auth0, authParams);
const JWT = accessToken.id_token;
return JWT;
}