Rubyae
Hono Oauth Provider with JWT issue
Yeah I'm not sure, I initially resolved it like this ^ but now I noticed that if I move the
import { sign } from "hono/jwt";
above the import { googleAuth } from '@hono/oauth-providers/google'
it also seems to be fine9 replies
Hono Oauth Provider with JWT issue
I did some extra testing and I assume this might be some strange override thingy going on? As I just checked, in the file where I have my Google endpoint for hono oauth providers I also have the sign from hono/jwt in there, if I move the line from hono/jwt above the one from google oauth providers, my vscode is not upset anymore :PikaThink:
9 replies
Hono Oauth Provider with JWT issue
I guess the thing that confuses me is that in
hono/dist/types/middleware/jwt/index.d.ts
is this:
so this is defining what you say and then the @hono/auth-providers
has this in its @hono/oauth-providers/dist/providers/google/index.d.ts
so it feels like this should just work out of the box without me adding anything extra9 replies
Hono Oauth Provider with JWT issue
Update: I did found out that I can resolve it by adding the Variables type https://hono.dev/api/context#set-get
yet I'm not sure if this is the way it's supposed to work, it seems kinda odd to me because both already have these things defined, it's just that's it's not properly being picked up I guess
9 replies