chore: rabbit comments

This commit is contained in:
Stavros
2026-06-01 15:47:19 +03:00
parent 5caee887de
commit b3c152fa1c
3 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -332,7 +332,10 @@ func (controller *OIDCController) Token(c *gin.Context) {
if ok {
controller.log.App.Warn().Msg("Code reuse detected")
controller.oidc.DeleteSessionBySub(c, usedCodeSub)
err := controller.oidc.DeleteSessionBySub(c, usedCodeSub)
if err != nil {
controller.log.App.Error().Err(err).Msg("Failed to delete session for reused code")
}
c.JSON(400, gin.H{
"error": "invalid_grant",
})
+1 -1
View File
@@ -684,7 +684,7 @@ func (service *OIDCService) GetSessionByToken(ctx context.Context, tokenHash str
// since there is no way for the client to access anything anymore
if entry.RefreshTokenExpiresAt < time.Now().Unix() {
// Deletes by sub
err := service.queries.DeleteSession(ctx, entry.Sub)
err := service.queries.DeleteOIDCSessionBySub(ctx, entry.Sub)
if err != nil {
return nil, err
}