fix: use authFetch for Todoist OAuth connect to send auth header
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 6s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 6s
This commit is contained in:
@@ -5927,8 +5927,13 @@ func (a *App) todoistOAuthConnectHandler(w http.ResponseWriter, r *http.Request)
|
||||
url.QueryEscape(redirectURI),
|
||||
)
|
||||
|
||||
log.Printf("Todoist OAuth: redirecting user_id=%d to Todoist", userID)
|
||||
http.Redirect(w, r, authURL, http.StatusTemporaryRedirect)
|
||||
log.Printf("Todoist OAuth: returning auth URL for user_id=%d", userID)
|
||||
|
||||
// Возвращаем JSON с URL для редиректа (frontend сделает редирект)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
"auth_url": authURL,
|
||||
})
|
||||
}
|
||||
|
||||
// todoistOAuthCallbackHandler обрабатывает OAuth callback
|
||||
|
||||
Reference in New Issue
Block a user