fix: harden auth flows and align api contracts

This commit is contained in:
Your Name
2026-05-30 21:29:24 +08:00
parent 7ad65a0138
commit a332917142
50 changed files with 23594 additions and 723 deletions

View File

@@ -132,6 +132,12 @@ func setupRealServer(t *testing.T) (*httptest.Server, func()) {
avatarH := handler.NewAvatarHandler(userRepo)
ssoManager := auth.NewSSOManager()
ssoClientsStore := auth.NewDefaultSSOClientsStore()
ssoClientsStore.RegisterClient(&auth.SSOClient{
ClientID: "test-client",
ClientSecret: "test-secret",
Name: "E2E Test Client",
RedirectURIs: []string{"http://localhost/callback"},
})
ssoH := handler.NewSSOHandler(ssoManager, ssoClientsStore)
rateLimitMW := middleware.NewRateLimitMiddleware(config.RateLimitConfig{})