omni-auth
できること
このスキルは、OmniRouteのAPIとダッシュボードで認証する方法を示します。ログイン、セッションの取得、サインインの設定が必要な開発者と管理者のためのものです。
使う場面
- ✓ベアラートークンでリクエストを認証する必要があるとき。
- ✓OmniRouteのダッシュボードにログインする、またはセッションのCookieを取得する必要があるとき。
- ✓シングルサインオンを設定する、またはログインの要件を変えたいとき。
スキルのリンク
https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-auth/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“スクリプトからOmniRouteにログインして、アクセストークンを取得するにはどうすればよいですか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、管理用パスワードを受け取ってセッションのCookieを返すログインのエンドポイントと、セキュリティトークンが必要なログアウトのエンドポイントを一覧にします。ダッシュボード用のシングルサインオンの方法も説明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Overview
Manage API key authentication and session tokens. Start here to authenticate requests via Bearer token, obtain session cookies, and configure login requirements for the OmniRoute API.
Authentication
Remote API requests use a Bearer credential. Dashboard login is different: POST /api/auth/login accepts a management password and returns an auth_token session cookie.
Endpoints
POST /api/auth/login
Authenticate user
curl -X POST http://localhost:20128/api/auth/login \
-H "Content-Type: application/json" \
-c cookie.jar \
-d '{"password":"<management-password>"}'
POST /api/auth/logout
Log out
CSRF_TOKEN=$(curl -s http://localhost:20128/api/auth/csrf -b cookie.jar | jq -r .token)
curl -X POST http://localhost:20128/api/auth/logout \
-b cookie.jar \
-H "x-omniroute-csrf: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET /api/auth/oidc/login
Start OIDC login for the dashboard admin gate
Builds an authorization URL from the configured OIDC issuer/client (discovered
via {issuer}/.well-known/openid-configuration, falling back to {issuer}/authorize),
sets a short-lived oidc_state cookie, and redirects the browser. Password login
remains available as a fallback while OIDC is enabled.
curl http://localhost:20128/api/auth/oidc/login \
-b cookie.jar
GET /api/auth/oidc/callback
Complete OIDC login for the dashboard admin gate
Validates the state cookie, exchanges the authorization code for tokens,
verifies the ID token against the issuer's JWKS (audience = client id), and
requires at least one dashboard admission policy: oidcAllowedSubjects
(matching sub or verified email) or oidcAdmissionClaim (matching a
configured array claim in the verified ID token). When both are present,
both must match. Without either policy the callback returns not_configured.
On success it mints the same 30-day auth_token dashboard-session JWT
used by password login and redirects to /dashboard.
curl http://localhost:20128/api/auth/oidc/callback \
-b cookie.jar
GET /api/auth/csrf
GET auth › csrf
curl http://localhost:20128/api/auth/csrf \
-b cookie.jar
GET /api/auth/status
GET auth › status
curl http://localhost:20128/api/auth/status \
-b cookie.jar
Payloads
See the full OpenAPI specification at GET /api/openapi/spec or docs/openapi.yaml for detailed request/response schemas.
OmniRoute
Local/remote AI gateway exposing OpenAI-compatible REST. One key, 380 providers, auto-fallback, RTK token saver, MCP server, A2A agents.
Setup
export OMNIROUTE_URL="http://localhost:20128" # or VPS / tunnel URL
export OMNIROUTE_KEY="sk-..." # from Dashboard → API Keys
All requests: ${OMNIROUTE_URL}/v1/... with Authorization: Bearer ${OMNIROUTE_KEY}.
Verify: curl $OMNIROUTE_URL/api/health → {"ok":true}
Discover models
curl $OMNIROUTE_URL/v1/models # chat/LLM (default)
curl $OMNIROUTE_URL/v1/models/image # image-gen
curl $OMNIROUTE_URL/v1/models/tts # text-to-speech
curl $OMNIROUTE_URL/v1/models/embedding # embeddings
curl $OMNIROUTE_URL/v1/models/web # web search + fetch
curl $OMNIROUTE_URL/v1/models/stt # speech-to-text
Use data[].id as model field in requests. Combos appear with owned_by:"combo".
Capability skills
よくある質問
ベアラートークンとダッシュボードのログインは何が違いますか?
リモートのAPIリクエストはベアラーの認証情報を使い、ダッシュボードのログインは管理用パスワードを使ってセッションのCookieを得ます。
シングルサインオンに対応していますか?
はい。スキルはダッシュボード用のOIDCログインを説明しています。パスワードでのログインは予備として残ります。
ローカル開発ではログインを省略できますか?
スキルは、ローカル開発ではキーの要件をオフにできると説明しています。
詳細
作者による元の説明
Manage API key authentication and session tokens. Start here to authenticate requests via Bearer token, obtain session cookies, and configure login requirements for the OmniRoute API.
人気
- GitHubのスター
- 84k
- ランキング
- #1420
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
cli-a2a
84kエージェント間の作業のためにOmniRouteのコマンドラインを使い、作業を送ったり、タスクの履歴を確認したり、スキルを試したりします。
cli-backup-sync
84kコマンドラインからOmniRouteのデータをバックアップします。スナップショット、クラウド同期、スケジュール、アーカイブからの復元に対応します。
cli-batches
84kコマンドラインからAIのバッチジョブを投入し、進捗を追跡して、結果やエラーを保存します。CIパイプラインでも使えます。
cli-chat
84kコマンドラインからAIモデルにチャットのリクエストを送ります。ストリーミングの返答、システムプロンプト、対話セッションに対応します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。