Skip to content

docs:添加OAuth功能的文档#8

Open
AkinaHaruka wants to merge 1 commit intoQexo:masterfrom
AkinaHaruka:master
Open

docs:添加OAuth功能的文档#8
AkinaHaruka wants to merge 1 commit intoQexo:masterfrom
AkinaHaruka:master

Conversation

@AkinaHaruka
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for configuring OAuth2/OIDC login in Qexo (Chinese + English) and exposes the new pages in the VitePress sidebar navigation.

Changes:

  • Added OAuth2/OIDC login setup guide in docs/exts/oauth2.md (zh-CN).
  • Added English version in docs/en/exts/oauth2.md.
  • Added sidebar links to the new pages in docs/.vitepress/config.ts.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
docs/exts/oauth2.md New Chinese OAuth2/OIDC configuration guide (providers, env vars, SSO-only mode, account linking).
docs/en/exts/oauth2.md English translation of the OAuth2/OIDC configuration guide.
docs/.vitepress/config.ts Adds sidebar entries for the new OAuth2/OIDC docs pages (zh-CN + en).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

### 支持 OIDC 规范的提供商,如Google, Authentik

1. 将`oidc_provider`更名为您自己的提供商名称,这个名称不会显示在页面上,它应该是简短的英文单词
<h4>请注意,在配置文件中,提供商名称(即`oidc_provider`这个位置的内容)必须是唯一的</h4>
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using raw HTML <h4> tags for emphasis/headings is inconsistent with the rest of the docs and may render/stylize unexpectedly across themes. Prefer Markdown (e.g., #### ... or bold "Note:") for these callouts (and apply the same change to the other <h4> blocks in this doc).

Copilot uses AI. Check for mistakes.
<h4> 对于不支持 OIDC 规范的提供商,Qexo 目前只支持 GitHub,如您有需要可以自行修改代码</h4>

1. 从 GitHub 处获得 `client_id` `client_secret` 填入配置文件
2. 将 icon 配置为一个指向 GitHub 微标的 URL
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“GitHub 微标” looks like a typo; in Chinese documentation the common term is “徽标/图标”.

Suggested change
2. 将 icon 配置为一个指向 GitHub 微标的 URL
2. 将 icon 配置为一个指向 GitHub 徽标的 URL

Copilot uses AI. Check for mistakes.

1. Obtain `client_id` and `client_secret` from GitHub and fill them into the configuration file.

2. Configure the icon to point to the GitHub logo. URL
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is an incomplete sentence ("...logo. URL") and reads like leftover text. Consider rewriting it to clearly instruct users to set icon to a GitHub logo URL.

Suggested change
2. Configure the icon to point to the GitHub logo. URL
2. Configure the icon field to use a URL that points to a GitHub logo image.

Copilot uses AI. Check for mistakes.

### Optional: Enable SSO Only Login

<h4>Note: Enabling this feature will disable Qexo's default username+password login passkey login, allowing only
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar/readability: “username+password login passkey login” is missing a conjunction and is hard to parse. Rephrase to clearly list the disabled login methods (e.g., username/password and passkey).

Suggested change
<h4>Note: Enabling this feature will disable Qexo's default username+password login passkey login, allowing only
<h4>Note: Enabling this feature will disable Qexo's default username/password and passkey logins, allowing only

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +55
<h4>Note that in the configuration file, the provider name (i.e., the content at the `oidc_provider` location) must be
unique.</h4>
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using raw HTML <h4> tags for notes/headings is inconsistent with most of the docs and may render unpredictably in Markdown. Prefer Markdown headings/bold text, and update the other <h4> blocks in this page for consistency.

Copilot uses AI. Check for mistakes.
{ text: "接入说说", link: "/exts/talks" },
{ text: "自定字段", link: "/exts/custom" },
{ text: "访客统计", link: "/exts/statistic" },
{text:"OAuth2/OIDC 登录",link:"/exts/oauth2"}
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code style inconsistency: this sidebar item doesn’t match the prevailing { text: "...", link: "..." }, formatting used throughout this config. Please align spacing (and add a trailing comma if that’s the file’s style) to keep the config consistent and avoid formatter churn.

Copilot uses AI. Check for mistakes.
{ text: "Qexo Talks", link: "/en/exts/talks" },
{ text: "Custom Fields", link: "/en/exts/custom" },
{ text: "PV Statistic", link: "/en/exts/statistic" },
{text:"OAuth2/OIDC Login",link:"/en/exts/oauth2"}
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code style inconsistency: this sidebar item uses {text:...,link:...} formatting unlike the rest of the file’s { text: "...", link: "..." }, entries. Please match the existing spacing/comma style for consistency.

Copilot uses AI. Check for mistakes.

## 须知

1. Auth2/OIDC 功能要求 Qexo >= 4.0.0,且使用现代浏览器
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auth2/OIDC appears to be a typo; this section is about OAuth2/OIDC, so readers may get confused and copy the wrong term.

Suggested change
1. Auth2/OIDC 功能要求 Qexo >= 4.0.0,且使用现代浏览器
1. OAuth2/OIDC 功能要求 Qexo >= 4.0.0,且使用现代浏览器

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants