Golang: Fiber middleware for NextAuth #12622
kiwamizamurai
started this conversation in
Ideas
Replies: 1 comment
-
Indeed, I often see requests to expose the JWT that Auth.js uses. However, I believe that Auth.js should concentrate solely on integrating the respective OAuth/OIDC providers and the full stack framework for the frontend, rather than including it for the purpose of interfacing with the backend servers. In particular, this example disables cookie protection (secure cookie), increasing security risks. For more information on Auth.js and backend integration, please refer to below document. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
I've created a Fiber middleware that makes it easy to validate NextAuth.js JWT tokens in Go Fiber applications: https://github.com/kiwamizamurai/fiber-nextauth
Non-Goals
Background
Next.js with NextAuth.js has become a popular choice for frontend authentication, while Go continues to gain traction for building high-performance backend services. However, integrating these two can be challenging, especially when dealing with JWT validation and CSRF protection.
Proposal
Key features:
I noticed several discussions about Go backend integration, but couldn't find a ready-to-use solution. This middleware aims to simplify the integration between Next.js frontends using NextAuth and Go Fiber backends.
The project includes working examples and documentation. Would love to get your feedback and suggestions!
Beta Was this translation helpful? Give feedback.
All reactions