Custom JWKS endpoint?
Hi, I've been integrating a provider (Web3Auth) and they only provide a JWKS endpoint where they return an identity token, no token/discovery/userinfo endpoints, does better-auth supports that? Seems like the generic auth kinda works with it but I can't find a way of providing a custom JWKS endpoint instead of the discovery URL.
3 Replies
seems like I need to expose a function like this one
https://github.com/better-auth/better-auth/blob/e11c51e210cbc9c4b7177e13a9c8efd2985c856f/packages/better-auth/src/social-providers/apple.ts#L105
GitHub
better-auth/packages/better-auth/src/social-providers/apple.ts at e...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
what a bad luck, that's not exposed on genericOAuth
did a little hack but it works! and for userInfo I simply decode the jwt
for the verifyIdToken code I basically followed what's done here
https://github.com/better-auth/better-auth/blob/e11c51e210cbc9c4b7177e13a9c8efd2985c856f/packages/better-auth/src/social-providers/apple.ts#L105
GitHub
better-auth/packages/better-auth/src/social-providers/apple.ts at e...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
