upstash / jstack

Confidently ship high-performance, low-cost Next.js apps
MIT License
845 stars 44 forks source link

Authorization examples #6

Open troyizzle opened 2 months ago

troyizzle commented 2 months ago

This may come with documentation but it would be useful to include some authorization examples I am currently struggling on how to include authorization with this stack, its probably a skill issue as I am unfamiliar with hono.

Has anyone incorporated anything yet?

I've tried using Clerk and Authjs and using these middlewares

https://github.com/honojs/middleware/tree/main/packages/auth-js https://github.com/honojs/middleware/tree/main/packages/clerk-auth

I've also tried sending across the credentials in the hono cors and on the fetch itself

adelrodriguez commented 2 months ago

I think Lucia would be a great choice for this stack, since it's easily to implement for both Hono and Next.js: https://lucia-auth.com/guides/validate-session-cookies/hono