forked from mystiq/dex
Use old ConnectorData before session.ConnectorData
This commit is contained in:
parent
45a40a13a3
commit
19ad7daa7f
1 changed files with 6 additions and 0 deletions
|
@ -1003,6 +1003,9 @@ func (s *Server) handleRefreshToken(w http.ResponseWriter, r *http.Request, clie
|
||||||
s.logger.Errorf("failed to get offline session: %v", err)
|
s.logger.Errorf("failed to get offline session: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else if len(refresh.ConnectorData) > 0 {
|
||||||
|
// Use the old connector data if it exists, should be deleted once used
|
||||||
|
connectorData = session.ConnectorData
|
||||||
} else {
|
} else {
|
||||||
connectorData = session.ConnectorData
|
connectorData = session.ConnectorData
|
||||||
}
|
}
|
||||||
|
@ -1087,6 +1090,9 @@ func (s *Server) handleRefreshToken(w http.ResponseWriter, r *http.Request, clie
|
||||||
old.Claims.EmailVerified = ident.EmailVerified
|
old.Claims.EmailVerified = ident.EmailVerified
|
||||||
old.Claims.Groups = ident.Groups
|
old.Claims.Groups = ident.Groups
|
||||||
old.LastUsed = lastUsed
|
old.LastUsed = lastUsed
|
||||||
|
|
||||||
|
// ConnectorData has been moved to OfflineSession
|
||||||
|
old.ConnectorData = []byte{}
|
||||||
return old, nil
|
return old, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue