π fix: slove the list connection always use require auth & should have trust client auth#13344
Conversation
β¦trust client check
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@nekomeowww @tjx666 - This PR fixes a marketplace SDK TRPC middleware auth issue (trust client check). It touches server-side middleware and router code. Please take a look. |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2415e5ae37
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (isTrustedClientEnabled()) { | ||
| return opts.next(); |
There was a problem hiding this comment.
Keep auth guard active when trusted client is enabled
requireMarketAuth now returns early whenever trusted-client env vars are set, before checking ctx.marketAccessToken/ctx.marketUserInfo. That bypasses the only local auth gate for credsProcedure (src/server/routers/lambda/market/creds.ts, which is built from publicProcedure), so unauthenticated requests can reach credential handlers in trusted-client deployments; previously they were rejected as UNAUTHORIZED at middleware level. At minimum this regresses auth semantics (missing-auth becomes downstream handler failures), and it weakens route protection for credential APIs.
Useful? React with πΒ / π.
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## canary #13344 +/- ##
==========================================
- Coverage 66.75% 66.75% -0.01%
==========================================
Files 1894 1894
Lines 152312 152316 +4
Branches 17374 14610 -2764
==========================================
+ Hits 101672 101673 +1
- Misses 50520 50523 +3
Partials 120 120
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
|
β€οΈ Great PR @ONLY-yours β€οΈ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
β¦trust client check
π» Change Type
π Related Issue
π Description of Change
π§ͺ How to Test
πΈ Screenshots / Videos
π Additional Information