
Khellendros97/dsh-subscription-auth
40Last commit Aug 15, 2026
dsh-subscription-auth DSH plugin
dsh-subscription-auth is a DSH plugin that enables OAuth-based login for four subscription services: ChatGPT, Claude, Grok, and Kimi. It handles authorization code PKCE flows and device authorization flows, stores tokens in the credential service, and automatically registers discovered models. The plugin includes a settings page for managing logins and a built-in skill for channel migration.
How to install the dsh-subscription-auth DSH plugin
dsh plugin --profile web add dsh-subscription-authCopying does not run this command. Review the repository and version before installing the dsh-subscription-auth DSH plugin.
dsh-subscription-auth DSH plugin data source
dsh-subscription-auth DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-subscription-auth DSH plugin can do
- Supports OAuth login for ChatGPT (Plus/Pro), Claude (Pro/Max), Grok (SuperGrok/X Premium+), and Kimi (Kimi Code)
- Uses PKCE authorization code flow for ChatGPT and Claude, device authorization flow for Grok and Kimi
- Automatically refreshes access tokens before expiry
- Registers login status-based providers and adapters into DSH model selector
- Provides a settings page to manage login, logout, and view discovered models
- Includes a built-in skill 'subscription-channel-migration' for extending to new channels
Where the dsh-subscription-auth DSH plugin fits
- Use a ChatGPT Plus subscription to access models via DSH instead of API keys
- Log in with Claude Pro to use Anthropic Messages API in DSH
- Authorize Grok (SuperGrok) using device code flow for xAI Responses
- Connect Kimi Code subscription to use Kimi's Anthropic-compatible API
- Migrate from manual source installation to npm package with one command
- Develop new subscription channels by implementing the ChannelDefinition interface
Who the dsh-subscription-auth DSH plugin is for
- DSH users who have paid subscriptions for ChatGPT, Claude, Grok, or Kimi
- Developers who want to extend DSH with additional OAuth-based AI providers
dsh-subscription-auth DSH plugin limitations
- ChatGPT and Claude OAuth flows require DSH running on localhost (callback to 127.0.0.1)
- Anthropic subscription OAuth authorization expires after ~30 days (refresh does not extend)
- Login tokens are stored locally in the credential service and must not be shared
- Each channel's model list is discovered after login; manual models config can override
dsh-subscription-auth DSH plugin: from the repository README
Quoted from the Khellendros97/dsh-subscription-auth README, the upstream source of the dsh-subscription-auth DSH plugin. Copyright remains with the original authors.
给 dsh 增加**订阅会员 OAuth 登录**支持(模型提供商按订阅账号登录,而不是 API key)。内置四个订阅渠道: | 渠道 | 登录方式 | 推理 API | |---|---|---| | ChatGPT 订阅(Plus/Pro) | 授权码 + PKCE + localhost 回调 | codex Responses API | | Claude(Pro/Max) | 授权码 + PKCE + localhost 回调 | Anthropic Messages API | | Grok(SuperGrok / X Premium+) | RFC 8628 设备授权流 | xAI Responses API | | Kimi(Kimi Code) | RFC 8628 设备授权流 | Kimi Anthropic Messages API | 每个渠道是一个自包含模块(`src/channels/<id>.ts`,实现 `ChannelDefinition` 契约),`src/index.ts` 是薄的通用驱动(遍历渠道定义注册 settings / provider / adapter / 路由)。OAuth 常量与 wire 格式以 omp(`@oh-my-pi/pi-ai`、`@oh-my-pi/pi-catalog`)源码为准。对接方法见内置 skill:`subscription-channel-migration`。 ## 渠道详情 | 环节 | ChatGPT | Claude | Grok | Kimi | |---|---|---|---|---| | 授权端点 | `https://auth.openai.com/oauth/authorize` | `https://claude.ai/oauth/authorize` | `https://auth.x.ai/oauth2/device/code` | `https://auth.kimi.com/api/oauth/device_authorization` | | 令牌端点 | `https://auth.openai.com/oauth/token` | `https://api.anthropic.com/v1/oauth/token` | (OIDC 发现 `https://auth.x.ai/.well-known/openid-configuration`) | `https://auth.kimi.com/api/oauth/token` | | `client_id` | `app_EMoamEEZ73f0CkXaXp7hrann` | `9d1c250a-e61b-44d9-88ed-5944d1962f5e` | `b1a00492-07
Read the full READMERepository license: BSD-3-Clause
dsh-subscription-auth DSH plugin questions
How do I install dsh-subscription-auth?
Run `dsh plugin --profile web add dsh-subscription-auth` in your terminal. Make sure DSH (web profile) is already running. This command will automatically install the npm package and register it in your DSH profile. After installation, restart DSH and hard refresh your browser (Cmd/Ctrl+Shift+R).
Can I use dsh-subscription-auth without a subscription?
No, this plugin is designed for users who have paid subscriptions for ChatGPT, Claude, Grok, or Kimi. It requires valid OAuth credentials from those services. If you don't have a subscription, you can still use DSH with API keys or other authentication methods.
Does the plugin support refreshing expired tokens?
Yes, the plugin automatically refreshes access tokens before they expire. For the authorization code channels (ChatGPT, Claude), it uses refresh tokens. For device flow channels (Grok, Kimi), it also handles token refresh. However, note that Anthropic's OAuth authorization expires after approximately 30 days and refresh does not extend the authorization period, so you will need to re-login.
Why do I see duplicate 'Subscription Service' entries in settings?
This usually happens if you have both the old manual source installation and the new npm package installed. To fix, follow the migration steps in the README: delete the manual mount line from `cordis.patch.yml`, remove the junction in `node_modules`, then reinstall via `dsh plugin add`. After that, restart DSH and hard refresh.
Can I add my own subscription channel to the plugin?
Yes, the plugin is extensible. You can create a new channel by implementing the `ChannelDefinition` interface in `src/channels/<id>.ts` and adding it to the `CHANNELS` array in `src/index.ts`. The built-in skill `subscription-channel-migration` provides guidance on migrating from the `@oh-my-pi` source. Refer to the README for detailed steps.