Add arc-openai-oauth crate for OpenAI OAuth PKCE token acquisition

Standalone library implementing OpenAI's OAuth PKCE flow (browser + device)
for authenticating with ChatGPT subscriptions instead of API keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-10 15:31:16 -04:00
parent abd0063184
commit d26149bf33
3 changed files with 1078 additions and 0 deletions

18
Cargo.lock generated
View file

@ -351,6 +351,24 @@ dependencies = [
"tracing",
]
[[package]]
name = "arc-openai-oauth"
version = "0.1.0"
dependencies = [
"axum",
"base64",
"hex",
"mockito",
"open",
"rand 0.8.5",
"reqwest 0.12.28",
"serde",
"serde_json",
"sha2",
"tokio",
"tracing",
]
[[package]]
name = "arc-slack"
version = "0.1.0"

View file

@ -0,0 +1,26 @@
[package]
name = "arc-openai-oauth"
edition.workspace = true
version.workspace = true
license.workspace = true
description = "OpenAI OAuth PKCE token acquisition for Arc"
[lib]
doctest = false
[dependencies]
serde.workspace = true
serde_json.workspace = true
reqwest.workspace = true
sha2.workspace = true
base64.workspace = true
rand.workspace = true
hex.workspace = true
tokio.workspace = true
tracing.workspace = true
axum = "0.8"
open = "5"
[dev-dependencies]
mockito = "1"
tokio = { workspace = true, features = ["test-util", "macros"] }

File diff suppressed because it is too large Load diff