Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions codex-rs/core/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,6 @@ async fn request_chatgpt_token_refresh(
client_id: CLIENT_ID,
grant_type: "refresh_token",
refresh_token,
scope: "openid profile email",
};

let endpoint = refresh_token_endpoint();
Expand Down Expand Up @@ -722,7 +721,6 @@ struct RefreshRequest {
client_id: &'static str,
grant_type: &'static str,
refresh_token: String,
scope: &'static str,
}

#[derive(Deserialize, Clone)]
Expand Down
3 changes: 2 additions & 1 deletion codex-rs/login/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ fn build_authorize_url(
("redirect_uri".to_string(), redirect_uri.to_string()),
(
"scope".to_string(),
"openid profile email offline_access".to_string(),
"openid profile email offline_access api.connectors.read api.connectors.invoke"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW][maintainability] Architectural finding

Impact: Can reduce maintainability or correctness if left unresolved.
Suggested fix: Apply a targeted refactor and add/adjust tests where needed.
Evidence: The OAuth scopes are hardcoded as a single string literal. If these scopes are referenced in other parts of the application (e.g., token validation), extracting them to a shared constant would prevent drift.

.to_string(),
),
(
"code_challenge".to_string(),
Expand Down
Loading