How to fully set up oauth provider in hono?
I have a Next.js project here for my frontend, and my backend uses Hono, Drizzle ORM, and Neon database. I've already finished setting up my session database authentication. Now, I want to set up Google login using the third-party middleware provided in the Hono documentation for the OAuth provider. Here's my setup: after logging in with Google, I want it to create a user in my Neon database so that I can also handle the user's session in the database. The problem I'm facing is that OAuth has its own session, which is the 'state'—it seems like an access token that lasts for 1 hour. I'm not sure how to apply it to my session database management.
Here's my flow for login and create a session of the authentication:
0 Replies