omni-auth
Skill này làm gì
Skill này chỉ cách xác thực với API và bảng điều khiển OmniRoute. Skill dành cho lập trình viên và quản trị viên cần đăng nhập, lấy phiên làm việc hoặc thiết lập tùy chọn đăng nhập.
Khi nào nên dùng
- ✓Khi người dùng cần xác thực một yêu cầu bằng bearer token.
- ✓Khi người dùng cần đăng nhập vào bảng điều khiển OmniRoute hoặc lấy session cookie.
- ✓Khi người dùng muốn thiết lập đăng nhập một lần (SSO) hoặc thay đổi yêu cầu đăng nhập.
Liên kết skill
https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/omni-auth/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm sao để tôi đăng nhập OmniRoute từ script để lấy access token?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill liệt kê endpoint đăng nhập, nhận mật khẩu quản trị và trả về session cookie, cùng endpoint đăng xuất, cần một token bảo mật. Skill cũng mô tả tùy chọn đăng nhập một lần cho bảng điều khiển.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Bearer token khác gì đăng nhập bảng điều khiển?
Yêu cầu API từ xa dùng một thông tin xác thực bearer, còn đăng nhập bảng điều khiển dùng mật khẩu quản trị và trả về session cookie.
Có hỗ trợ đăng nhập một lần không?
Có. Skill mô tả đăng nhập OIDC cho bảng điều khiển, và đăng nhập bằng mật khẩu vẫn được giữ làm phương án dự phòng.
Tôi có thể bỏ qua đăng nhập khi phát triển cục bộ không?
Skill nói yêu cầu xác thực có thể được tắt khi phát triển cục bộ.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 84k
- Vị trí xếp hạng
- #1420
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
cli-a2a
84kChạy công cụ dòng lệnh OmniRoute cho các tác vụ giữa các agent, giúp bạn gửi công việc, xem lịch sử tác vụ và kiểm thử skill.
cli-backup-sync
84kChạy sao lưu dữ liệu OmniRoute từ dòng lệnh, gồm bản chụp, đồng bộ đám mây, lịch sao lưu và khôi phục từ file lưu trữ.
cli-batches
84kGửi các tác vụ AI hàng loạt từ dòng lệnh, theo dõi tiến độ và lưu kết quả hoặc lỗi, kể cả cho các pipeline CI.
cli-chat
84kGửi yêu cầu trò chuyện đến các model AI từ dòng lệnh, với câu trả lời theo luồng, system prompt và phiên tương tác.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.