fix: refresh token to access token (#7949)

* fix: fix refresh token to access token

* fix: update the if condition
This commit is contained in:
Nityananda Gohain 2025-05-15 12:52:14 +05:30 committed by GitHub
parent f525647b40
commit b8dff86a56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,6 +38,7 @@ func (h *Handler) Login(w http.ResponseWriter, r *http.Request) {
return
}
if req.RefreshToken == "" {
// the EE handler wrapper passes the feature flag value in context
ssoAvailable, ok := ctx.Value(types.SSOAvailable).(bool)
if !ok {
@ -52,6 +53,7 @@ func (h *Handler) Login(w http.ResponseWriter, r *http.Request) {
return
}
}
}
user, err := h.module.GetAuthenticatedUser(ctx, req.OrgID, req.Email, req.Password, req.RefreshToken)
if err != nil {