Skip to content

Commit

Permalink
Revert "Store offline sessions only if they were requested by the user (
Browse files Browse the repository at this point in the history
dexidp#3125)"

This reverts commit 5829ba7.
  • Loading branch information
mdpradeep committed Oct 20, 2023
1 parent 355d7a7 commit 92949dd
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 227 deletions.
11 changes: 0 additions & 11 deletions server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,17 +539,6 @@ func (s *Server) finalizeLogin(identity connector.Identity, authReq storage.Auth
return returnURL, false, nil
}

offlineAccessRequested := false
for _, scope := range authReq.Scopes {
if scope == scopeOfflineAccess {
offlineAccessRequested = true
break
}
}
if !offlineAccessRequested {
return returnURL, false, nil
}

// Try to retrieve an existing OfflineSession object for the corresponding user.
session, err := s.storage.GetOfflineSessions(identity.UserID, authReq.ConnectorID)
if err != nil {
Expand Down
Loading

0 comments on commit 92949dd

Please sign in to comment.