HonoH
Hono7mo ago
Mirith

Auth0 and Hono

I am building an SPA in angular to run on cloudflare with Hono as the back end. I'm trying to add some third party user authentication so I don't have to do it myself, and as this is a small project, Auth0 seems fine. The front-end part of angular+auth0 is working, however, I cannot get the back-end to work. I've tried both the auth-js middleware with an Auth0 provider, as well as just using the OIDC middleware and the jwt middleware.
The auth-js just rejects the token (I have verified that the token was being sent), while the OIDC gives me a CORS error. I have no idea which of these is even close to working. I am also okay just switching to something else as long as its simple to implement in angular (better-auth has no angular support nor could I find any easy examples). I'm not terribly knowledgeable about this sort of thing, so I apologize if I get terminology wrong. Is there a good example of how to implement either the OIDC middleware or the auth-js middleware? Auth0 has an express example doing something with JWT, but I think its the same as the JWT in hono.
Was this page helpful?