@lobehub/chat 1.141.10 → 1.142.0
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/.env.example +3 -0
- package/CHANGELOG.md +25 -0
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/src/layout/AuthProvider/Clerk/index.tsx +12 -0
package/.env.example
CHANGED
|
@@ -256,6 +256,9 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
|
|
256
256
|
# you need to config the clerk webhook secret key if you want to use the clerk with database
|
|
257
257
|
#CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
|
258
258
|
|
|
259
|
+
# Clear allow origin https://clerk.com/docs/guides/dashboard/dns-domains/satellite-domains
|
|
260
|
+
# Authentication across different domains , use,to splite different origin
|
|
261
|
+
# NEXT_PUBLIC_CLERK_AUTH_ALLOW_ORIGINS='https://market.lobehub.com,https://lobehub.com'
|
|
259
262
|
|
|
260
263
|
# NextAuth related configurations
|
|
261
264
|
# NEXT_PUBLIC_ENABLE_NEXT_AUTH=1
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 1.142.0](https://github.com/lobehub/lobe-chat/compare/v1.141.10...v1.142.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2025-10-24**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Use env to control clerk allow origin feature.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Use env to control clerk allow origin feature, closes [#9863](https://github.com/lobehub/lobe-chat/issues/9863) ([490fee0](https://github.com/lobehub/lobe-chat/commit/490fee0))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 1.141.10](https://github.com/lobehub/lobe-chat/compare/v1.141.9...v1.141.10)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2025-10-23**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.142.0",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot 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",
|
|
@@ -30,6 +30,17 @@ const Clerk = memo(({ children }: PropsWithChildren) => {
|
|
|
30
30
|
});
|
|
31
31
|
}, [count, setCount, isPending, startTransition]);
|
|
32
32
|
|
|
33
|
+
const allowedRedirectOrigins = useMemo(() => {
|
|
34
|
+
const rawOrigins = process.env.NEXT_PUBLIC_CLERK_AUTH_ALLOW_ORIGINS;
|
|
35
|
+
if (!rawOrigins) return undefined;
|
|
36
|
+
|
|
37
|
+
const origins = rawOrigins
|
|
38
|
+
.split(',')
|
|
39
|
+
.map((origin) => origin.trim())
|
|
40
|
+
.filter(Boolean);
|
|
41
|
+
return origins.length ? origins : undefined;
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
33
44
|
const updatedAppearance = useMemo(
|
|
34
45
|
() => ({
|
|
35
46
|
...appearance,
|
|
@@ -43,6 +54,7 @@ const Clerk = memo(({ children }: PropsWithChildren) => {
|
|
|
43
54
|
|
|
44
55
|
return (
|
|
45
56
|
<ClerkProvider
|
|
57
|
+
allowedRedirectOrigins={allowedRedirectOrigins}
|
|
46
58
|
appearance={updatedAppearance}
|
|
47
59
|
localization={localization}
|
|
48
60
|
signUpUrl={!enableClerkSignUp ? '/login' : '/signup'} // Redirect sign-up to sign-in if disabled
|