Logto Integration Attempt 1.

This commit is contained in:
2025-05-07 22:53:15 +08:00
parent 8252a4bb14
commit 4682fe3eb4
18 changed files with 487 additions and 37 deletions
+14 -1
View File
@@ -9,6 +9,19 @@ import (
// RegisterRoutes registers all API routes under the given group
func RegisterRoutes(rg *gin.RouterGroup) {
// Apply CORS middleware first (before any other middleware)
rg.Use(middleware.CORS())
// Then apply other middlewares
rg.Use(middleware.Logger())
// Define routes
rg.GET("/health", handlers.HealthCheck)
}
// Logto authentication routes
rg.GET("/auth/", handlers.HomeHandler)
rg.GET("/auth/sign-in", handlers.SignInHandler)
rg.GET("/auth/callback", handlers.CallbackHandler)
rg.GET("/auth/sign-out", handlers.SignOutHandler)
rg.GET("/auth/user-id-token-claims", handlers.UserIdTokenClaimsHandler)
}