skillhub/web/public
XiaoSeS f29ac241fc feat(auth): add Feishu as a public login provider
Adds Feishu (Lark) as a public sign-in option: it authenticates a
SkillHub platform account and nothing more. No Organization membership,
no directory sync, no Namespace grants.

Feishu deviates from standard OAuth in two ways this handles:
its userinfo response is wrapped in a {code, msg, data} envelope, and it
reports errors with HTTP 200. FeishuOAuth2UserService unwraps that
envelope into flat attributes; FeishuClaimsExtractor maps them to the
shared OAuthClaims, so account decisions still run through the unified
identity core added in R1-A.

Subject and email semantics, which decide whether a login can reach an
existing account:

- open_id is the only subject. union_id stays in extra rather than
  acting as a fallback: a subject that can change between logins would
  split one person across two platform accounts. Promoting union_id
  later needs an explicit alias migration.
- A blank or missing open_id fails the login instead of binding the
  literal string "null".
- emailVerified is always false. Feishu emails are imported by an
  organization admin and never confirmed with the user, so they carry no
  verification signal and cannot be used to join an existing account.

Operational bounds: the userinfo call has connect and read timeouts so an
unresponsive Feishu endpoint cannot hold a login thread, and the
OAuth2Error description carries only the provider error code, because an
upstream message can quote the request URI and with it the access token.
Like the GitHub and GitLab extractors, the claims extractor logs nothing.

The login button follows the existing config-driven catalog: with no
client id configured, /api/v1/auth/methods does not list Feishu and no
button renders. No frontend code change is needed; the icon resolves by
provider name.

Adapted from the implementation in #696 by @yhd4711499, re-extracted onto
current main with the subject, logging and timeout changes above.

Part of R1-A2 (public Provider adapters) per
openspec/changes/enterprise-identity-platform/rollout-plan.md.

Co-authored-by: yhd4711499 <yhd4711499@users.noreply.github.com>
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-09-21 10:18:37 +08:00
..
fonts fix(web): self-host Inter and JetBrains Mono fonts (#753) 2026-08-25 13:49:08 +08:00
favicon.svg feat(web): add SkillHub logo as browser favicon 2026-03-14 11:45:55 +08:00
feishu-logo.svg feat(auth): add Feishu as a public login provider 2026-09-21 10:18:37 +08:00
github-logo.svg feat(auth): add GitLab OAuth2 provider support (#264) 2026-04-17 19:56:32 +08:00
gitlab-logo.svg feat(auth): add GitLab OAuth2 provider support (#264) 2026-04-17 19:56:32 +08:00
oidc-logo.svg fix(web) 添加oidc的logo文件,配置oidc登录后图裂无logo太丑了 (#734) 2026-08-26 19:45:08 +08:00
robots.txt chore(web): remove doc injection and add crawler metadata (#102) 2026-03-19 15:33:06 +08:00
runtime-config.js fix(web): stabilize auth shell startup flow 2026-03-15 15:36:30 +08:00
sitemap.xml chore(web): remove doc injection and add crawler metadata (#102) 2026-03-19 15:33:06 +08:00