# 使用 Homebrew, MacPorts, Nix, scoop 安装 oauth2c

查看 oauth2c 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:oauth2c
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install oauth2c
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install oauth2c
```

  证据: MacPorts ports tree: security/oauth2c/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#oauth2c
```

  证据: nixpkgs package indexes: pkgs/by-name/oa/oauth2c/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/oauth2c
```

  证据: Scoop official bucket manifest trees: bucket/oauth2c.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:oauth2c
- **软件包管理器:** Homebrew
- **版本:** 1.20.0
- **来源摘要:** User-friendly CLI for OAuth2
- **主页:** <https://github.com/SecureAuthCorp/oauth2c>
- **仓库:** <https://github.com/SecureAuthCorp/oauth2c>
- **最后更新:** 2026-07-27T23:46:49+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- oauth2c (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.20.0
## 项目历史与用法

oauth2c is a Go command-line client for exercising OAuth 2.0 and OpenID Connect flows against authorization servers. Its package-nerd appeal is that it packages a large cross-section of OAuth client behavior into one executable: authorization code, device, client credentials, JWT bearer, token exchange, refresh-token flows, PKCE, JARM, PAR, DPoP, RAR, private-key JWT, client-secret modes, and mutual-TLS-related endpoints.

### 项目历史

The public GitHub repository was created on 2022-06-27 under the Cloudentity lineage and later appears under SecureAuthCorp on GitHub, while Homebrew still records the homepage as the Cloudentity repository URL. The README presents oauth2c as a tool for making token-fetching experiments easier across basic and advanced OAuth/OIDC profiles rather than as a provider-specific helper.

The release train reached v1.20.0 on 2026-04-29, with prebuilt release assets for Darwin and Linux architectures. That release metadata, combined with the small Go codebase and Homebrew source build, shows oauth2c evolving as a compact protocol-workbench CLI rather than a full identity platform.

### 采用历史

Homebrew core packaged oauth2c as a normal formula with the `oauth2c` executable, Go as the build dependency, and version 1.20.0 in the 2026-07-01 formula JSON. Homebrew analytics for that formula recorded 357 installs over 365 days, which points to niche but real use among developers and identity engineers.

The GitHub repository metadata recorded 925 stars and 50 forks, a stronger adoption signal than most one-purpose OAuth CLIs. Its README also links to Repology packaging status, indicating that the project is tracked beyond Homebrew.

### 使用方式

Developers use oauth2c to walk OAuth and OIDC flows from a terminal, often with a local callback listener for browser-based authorization-code flows. The README explicitly notes the default localhost callback URL, the option to suppress browser automation, request tracing, and `--silent` output for CI/CD or scripting.

The tool is useful when debugging authorization-server behavior because it exposes knobs that many SDKs hide: response types and modes, token endpoint authentication methods, signed or encrypted request objects, pushed authorization requests, proof-of-possession tokens, scopes, audiences, resources, and explicit endpoint overrides.

### 为什么软件包爱好者会关心

oauth2c is a good example of a package-manager-friendly security/developer tool: one static-feeling Go CLI, no runtime dependencies in Homebrew, broad standards coverage, and prebuilt upstream binaries. For av.db, it sits at the intersection of OAuth protocol testing, identity-provider integration, and shell automation.

### 时间线

- 2022-06-27: the public GitHub repository was created.
- 2026-04-29: GitHub release v1.20.0 was published.
- 2026-07-01: Homebrew core formula metadata listed stable version 1.20.0 and the `oauth2c` executable.

### Related projects

- oauth2c overlaps with provider-specific token helpers such as Google's oauth2l, but it targets generic OAuth 2.0, OIDC, FAPI, and JWT profiles instead of a single cloud provider.

### 来源

- <https://api.github.com/repos/SecureAuthCorp/oauth2c>
- <https://api.github.com/repos/SecureAuthCorp/oauth2c/releases?per_page=5>
- <https://formulae.brew.sh/api/formula/oauth2c.json>
- <https://github.com/SecureAuthCorp/oauth2c>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - oauth2c: normalized package name match | nixpkgs package indexes: pkgs/by-name/oa/oauth2c/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - oauth2c: normalized package name match | MacPorts ports tree: security/oauth2c/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/oauth2c: normalized package name match | Scoop official bucket manifest trees: bucket/oauth2c.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/oauth2c.yml](https://github.com/mxcl/pkgdb/blob/main/combined/oauth2c.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
