Logto Integration Attempt 1.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user