Replies: 1 comment
-
seems your private_key is not a valid input. Look into that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm getting this error using jose v2.0.2
key must be an instance of a key instantiated by JWK.asKey, or a valid JWK.asKey input
How can I resolve this?
Usage of JWT
import { JWT } from "jose";
let jwtToken = JWT.sign(
{ sub: service_id },
private_key,
{
algorithm: service_algorithm,
audience:
${service_url}
,expiresIn: service_expiresIn,
header: {
typ: "JWT",
},
issuer: service_id,
}
);
Beta Was this translation helpful? Give feedback.
All reactions