Gin Framework
The Gin adapter is a separate Go module. Install it alongside the core library:
The Gin adapter is a separate Go module. Install it alongside the core library:
go get github.com/bete7512/goauth/pkg/adapters/ginadapterAfter successfully creating and initializing a, register its routes:
router := gin.Default()
ginadapter.Register(router, a)
if err := router.Run(":8080"); err != nil {
return err
}Import github.com/gin-gonic/gin and github.com/bete7512/goauth/pkg/adapters/ginadapter. This fragment belongs in a function returning error. For graceful shutdown, serve router through an http.Server, stop the server, then shut down GoAuth as shown in Quick Start.
When developing against this repository, add local replace directives for both the root module and the adapter module. Published adapter versions may target an older API. See Installation.
Enterprise Deployment
Deploy GoAuth inside your application and share the persistence required by the selected modules across replicas. Both Session and Stateless depend on…
Auth Lifecycle
GoAuth follows New → Use → Initialize → Shutdown. Configuration is copied at construction; configure the application before initialization rather than…