mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 12:32:30 +08:00
### What problem does this PR solve? Deprecate `/github_callback` route in favor of `/oauth/callback/<channel>` for GitHub OAuth integration: - Added GitHub OAuth support in the authentication module - Introduced `GithubOAuthClient` with methods to fetch and normalize user info - Updated `CLIENT_TYPES` to include GitHub OAuth client - Deprecated `/github_callback` route and suggested using the generic `/oauth/callback/<channel>` route --- - Related pull requests: - #7379 - #7553 ### Usage - [Create a GitHub OAuth App](https://github.com/settings/applications/new) to obtain the `client_id` and `client_secret`, configure the authorization callback url: `https://your-app.com/v1/user/oauth/callback/github` - Edit `service_conf.yaml.template`: ```yaml # ... oauth: github: type: "github" icon: "github" display_name: "Github" client_id: "your_client_id" client_secret: "your_client_secret" redirect_uri: "https://your-app.com/v1/user/oauth/callback/github" # ... ``` ### Type of change - [x] Documentation Update - [x] Refactoring (non-breaking change)
99 lines
2.4 KiB
YAML
99 lines
2.4 KiB
YAML
ragflow:
|
|
host: 0.0.0.0
|
|
http_port: 9380
|
|
mysql:
|
|
name: 'rag_flow'
|
|
user: 'root'
|
|
password: 'infini_rag_flow'
|
|
host: 'localhost'
|
|
port: 5455
|
|
max_connections: 900
|
|
stale_timeout: 300
|
|
minio:
|
|
user: 'rag_flow'
|
|
password: 'infini_rag_flow'
|
|
host: 'localhost:9000'
|
|
es:
|
|
hosts: 'http://localhost:1200'
|
|
username: 'elastic'
|
|
password: 'infini_rag_flow'
|
|
os:
|
|
hosts: 'http://localhost:1201'
|
|
username: 'admin'
|
|
password: 'infini_rag_flow_OS_01'
|
|
infinity:
|
|
uri: 'localhost:23817'
|
|
db_name: 'default_db'
|
|
redis:
|
|
db: 1
|
|
password: 'infini_rag_flow'
|
|
host: 'localhost:6379'
|
|
|
|
# postgres:
|
|
# name: 'rag_flow'
|
|
# user: 'rag_flow'
|
|
# password: 'infini_rag_flow'
|
|
# host: 'postgres'
|
|
# port: 5432
|
|
# max_connections: 100
|
|
# stale_timeout: 30
|
|
# s3:
|
|
# access_key: 'access_key'
|
|
# secret_key: 'secret_key'
|
|
# region: 'region'
|
|
# oss:
|
|
# access_key: 'access_key'
|
|
# secret_key: 'secret_key'
|
|
# endpoint_url: 'http://oss-cn-hangzhou.aliyuncs.com'
|
|
# region: 'cn-hangzhou'
|
|
# bucket: 'bucket_name'
|
|
# azure:
|
|
# auth_type: 'sas'
|
|
# container_url: 'container_url'
|
|
# sas_token: 'sas_token'
|
|
# azure:
|
|
# auth_type: 'spn'
|
|
# account_url: 'account_url'
|
|
# client_id: 'client_id'
|
|
# secret: 'secret'
|
|
# tenant_id: 'tenant_id'
|
|
# container_name: 'container_name'
|
|
# user_default_llm:
|
|
# factory: 'Tongyi-Qianwen'
|
|
# api_key: 'sk-xxxxxxxxxxxxx'
|
|
# base_url: ''
|
|
# oauth:
|
|
# github:
|
|
# type: github
|
|
# icon: github
|
|
# display_name: "Github"
|
|
# client_id: xxxxxxxxxxxxxxxxxxxxxxxxx
|
|
# client_secret: xxxxxxxxxxxxxxxxxxxxxxxx
|
|
# redirect_uri: https://your-app.com/v1/user/oauth/callback/github
|
|
# feishu:
|
|
# app_id: cli_xxxxxxxxxxxxxxxxxxx
|
|
# app_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
# app_access_token_url: https://open.feishu.cn/open-apis/auth/v3/app_access_token/internal
|
|
# user_access_token_url: https://open.feishu.cn/open-apis/authen/v1/oidc/access_token
|
|
# grant_type: 'authorization_code'
|
|
# custom_channel:
|
|
# type: oidc
|
|
# icon: sso
|
|
# display_name: "Custom Channel"
|
|
# issuer: https://provider.com/v1/oidc
|
|
# client_id: xxxxxxxxxxxxxxxxxxxxxxxxx
|
|
# client_secret: xxxxxxxxxxxxxxxxxxxxxxxx
|
|
# scope: "openid email profile"
|
|
# redirect_uri: https://your-app.com/v1/user/oauth/callback/custom_channel
|
|
# authentication:
|
|
# client:
|
|
# switch: false
|
|
# http_app_key:
|
|
# http_secret_key:
|
|
# site:
|
|
# switch: false
|
|
# permission:
|
|
# switch: false
|
|
# component: false
|
|
# dataset: false
|