fix(auth): improve sign out handling (#2030)

* fix(auth): create index on token table

* only terminate active sessions

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Silvan
2021-07-19 15:12:00 +02:00
committed by GitHub
parent 1b6fcebaa6
commit 3d865b3178
3 changed files with 10 additions and 3 deletions

View File

@@ -154,6 +154,9 @@ func (o *OPStorage) TerminateSession(ctx context.Context, userID, clientID strin
logging.Log("OIDC-Ghgr3").WithError(err).Error("error retrieving user sessions")
return err
}
if len(userIDs) == 0 {
return nil
}
err = o.command.HumansSignOut(ctx, userAgentID, userIDs)
logging.Log("OIDC-Dggt2").OnError(err).Error("error signing out")
return err