Skip to content

πŸ”₯ refactor(auth): remove NextAuth dead code from auth middleware#13370

Merged
tjx666 merged 2 commits intocanaryfrom
refactor/remove-nextauth-dead-code
Mar 29, 2026
Merged

πŸ”₯ refactor(auth): remove NextAuth dead code from auth middleware#13370
tjx666 merged 2 commits intocanaryfrom
refactor/remove-nextauth-dead-code

Conversation

@tjx666
Copy link
Copy Markdown
Member

@tjx666 tjx666 commented Mar 28, 2026

πŸ’» Change Type

  • πŸ”₯ refactor

πŸ”€ Description of Change

Remove leftover NextAuth dead code from auth middleware after NextAuth was fully removed in #11732:

  • Remove nextAuthAuthorized field from CheckAuthParams interface
  • Remove OAUTH_AUTHORIZED header read and passthrough in checkAuth
  • Remove OAUTH_AUTHORIZED export from envs/auth.ts (only consumer left was _deprecated/)
  • Clean up test that set the X-oauth-authorized header

πŸ§ͺ How to Test

  • Existing tests pass

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Mar 29, 2026 1:17pm

Request Review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot
Copy link
Copy Markdown
Member

@nekomeowww - This is a backend auth middleware refactor (removing NextAuth dead code). Please take a look.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 66.95%. Comparing base (966f943) to head (e56cb1f).
⚠️ Report is 2 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff            @@
##           canary   #13370     +/-   ##
=========================================
  Coverage   66.94%   66.95%             
=========================================
  Files        1903     1903             
  Lines      153684   153681      -3     
  Branches    15534    17678   +2144     
=========================================
+ Hits       102889   102890      +1     
+ Misses      50675    50671      -4     
  Partials      120      120             
Flag Coverage Ξ”
app 58.52% <100.00%> (+<0.01%) ⬆️
database 96.66% <ΓΈ> (ΓΈ)
packages/agent-runtime 89.61% <ΓΈ> (ΓΈ)
packages/context-engine 86.47% <ΓΈ> (ΓΈ)
packages/conversation-flow 92.36% <ΓΈ> (ΓΈ)
packages/file-loaders 87.02% <ΓΈ> (ΓΈ)
packages/memory-user-memory 66.68% <ΓΈ> (ΓΈ)
packages/model-bank 99.85% <ΓΈ> (ΓΈ)
packages/model-runtime 84.44% <ΓΈ> (ΓΈ)
packages/prompts 67.76% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/utils 90.41% <ΓΈ> (ΓΈ)
packages/web-crawler 88.82% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 67.29% <ΓΈ> (ΓΈ)
Services 49.30% <ΓΈ> (ΓΈ)
Server 67.28% <ΓΈ> (+0.01%) ⬆️
Libs 51.03% <ΓΈ> (ΓΈ)
Utils 91.01% <ΓΈ> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tjx666 tjx666 merged commit 7009193 into canary Mar 29, 2026
30 of 31 checks passed
@tjx666 tjx666 deleted the refactor/remove-nextauth-dead-code branch March 29, 2026 13:17
@lobehubbot
Copy link
Copy Markdown
Member

❀️ Great PR @tjx666 ❀️

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.

cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Mar 31, 2026
…ehub#13370)

* πŸ”₯ refactor(auth): remove NextAuth dead code from auth middleware

* chore: shorter cookie cache duration
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