@lobehub/lobehub 2.1.8 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 2.1.9](https://github.com/lobehub/lobe-chat/compare/v2.1.8...v2.1.9)
6
+
7
+ <sup>Released on **2026-02-02**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Use oauth2.link for generic OIDC provider account linking.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Use oauth2.link for generic OIDC provider account linking, closes [#12024](https://github.com/lobehub/lobe-chat/issues/12024) ([c7a06a4](https://github.com/lobehub/lobe-chat/commit/c7a06a4))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 2.1.8](https://github.com/lobehub/lobe-chat/compare/v2.1.7...v2.1.8)
6
31
 
7
32
  <sup>Released on **2026-02-01**</sup>
package/changelog/v2.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Use oauth2.link for generic OIDC provider account linking."
6
+ ]
7
+ },
8
+ "date": "2026-02-02",
9
+ "version": "2.1.9"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
6
6
 
7
7
  import { modal, notification } from '@/components/AntdStaticMethods';
8
8
  import AuthIcons from '@/components/AuthIcons';
9
+ import { isBuiltinProvider, normalizeProviderId } from '@/libs/better-auth/utils/client';
9
10
  import { useServerConfigStore } from '@/store/serverConfig';
10
11
  import { serverConfigSelectors } from '@/store/serverConfig/selectors';
11
12
  import { useUserStore } from '@/store/user';
@@ -33,8 +34,11 @@ export const SSOProvidersList = memo(() => {
33
34
  }, [providers]);
34
35
 
35
36
  // Get available providers for linking (filter out already linked)
37
+ // Normalize provider IDs when comparing to handle aliases (e.g. microsoft-entra-id → microsoft)
36
38
  const availableProviders = useMemo(() => {
37
- return (oAuthSSOProviders || []).filter((provider) => !linkedProviderIds.has(provider));
39
+ return (oAuthSSOProviders || []).filter(
40
+ (provider) => !linkedProviderIds.has(normalizeProviderId(provider)),
41
+ );
38
42
  }, [oAuthSSOProviders, linkedProviderIds]);
39
43
 
40
44
  const handleUnlinkSSO = async (provider: string) => {
@@ -63,14 +67,24 @@ export const SSOProvidersList = memo(() => {
63
67
  };
64
68
 
65
69
  const handleLinkSSO = async (provider: string) => {
66
- if (enableAuthActions) {
67
- // Use better-auth native linkSocial API
68
- const { linkSocial } = await import('@/libs/better-auth/auth-client');
70
+ if (!enableAuthActions) return;
71
+
72
+ const normalizedProvider = normalizeProviderId(provider);
73
+ const { linkSocial, oauth2 } = await import('@/libs/better-auth/auth-client');
74
+
75
+ if (isBuiltinProvider(normalizedProvider)) {
76
+ // Use better-auth native linkSocial API for built-in providers
69
77
  await linkSocial({
70
78
  callbackURL: '/profile',
71
- provider: provider as any,
79
+ provider: normalizedProvider as any,
72
80
  });
81
+ return;
73
82
  }
83
+
84
+ await oauth2.link({
85
+ callbackURL: '/profile',
86
+ providerId: normalizedProvider,
87
+ });
74
88
  };
75
89
 
76
90
  // Dropdown menu items for linking new providers
@@ -10,6 +10,7 @@ import type { auth } from '@/auth';
10
10
 
11
11
  export const {
12
12
  linkSocial,
13
+ oauth2,
13
14
  accountInfo,
14
15
  listAccounts,
15
16
  requestPasswordReset,