JWK must be an object
Hi all, getting the following error trying to use the JWT plugin... any pointers?
SERVER_ERROR: [TypeError: JWK must be an object]
GET /api/auth/get-session 500 in 823ms
Thanks in advance!
9 Replies
Can I see your auth config?
I ended up just implemented my own api route to generate the jwts instead (using the schema better-auth generated)
Thanks for your reply tho
@edwardrenton maybe this is helpful?
I think I got a similar error and at some point ended up with this config working
can you provide the code for this?
trying to use the JWT plugin and getting a different error:
TypeError: Invalid key for this operation, its asymmetricKeyType must be rsa
when using RS256
update: deleting the db/clearing all sessions + jwks seems to have fixed it?
I get the error
Check the DB, the JWK config may be cached in it
yeah clear out your db
just delete .wrangler if youre using d1
Nh its a problem with cloudflare not supporting jose's crypto key