forked from baron/baron-sso
세션 종료 시 모든 세션 종료 에러 수정
This commit is contained in:
@@ -7219,6 +7219,9 @@ func (h *AuthHandler) loadSessionClientBindings(ctx context.Context, userID stri
|
||||
logs, err := h.AuditRepo.FindByUserAndEvents(ctx, userID, []string{
|
||||
"consent.granted",
|
||||
"POST /api/v1/auth/oidc/login/accept",
|
||||
"POST /api/v1/auth/password/login",
|
||||
"password_login_success",
|
||||
"login_success",
|
||||
}, 200)
|
||||
if err != nil {
|
||||
return bindings
|
||||
@@ -7265,7 +7268,7 @@ func (h *AuthHandler) revokeHydraSessionAccess(ctx context.Context, userID strin
|
||||
|
||||
clientIDs := h.loadSessionClientBindings(ctx, userID)[strings.TrimSpace(sessionID)]
|
||||
if len(clientIDs) == 0 {
|
||||
return h.Hydra.RevokeConsentSessions(ctx, userID, "")
|
||||
return nil
|
||||
}
|
||||
for _, clientID := range clientIDs {
|
||||
if err := h.Hydra.RevokeConsentSessions(ctx, userID, clientID); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user