Skip to content

fix(auth): resolve stale auth data cached#148

Merged
chef0111 merged 1 commit intomainfrom
staging
Feb 14, 2026
Merged

fix(auth): resolve stale auth data cached#148
chef0111 merged 1 commit intomainfrom
staging

Conversation

@chef0111
Copy link
Copy Markdown
Owner

@chef0111 chef0111 commented Feb 14, 2026

Summary by CodeRabbit

  • Performance Improvements

    • Optimized caching strategy for general content delivery while maintaining strict security controls for authentication endpoints.
  • Bug Fixes

    • Enhanced logout functionality with improved session management and state refresh upon sign-out.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 14, 2026

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

Project Deployment Actions Updated (UTC)
dev4room Ready Ready Preview, Comment Feb 14, 2026 6:19am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 14, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Caching policies in next.config.ts are restructured to apply public caching to all paths while restricting authentication API endpoints to private, no-cache policies. Additionally, logout navigation in two components is updated to use Next.js router methods instead of direct window location assignment.

Changes

Cohort / File(s) Summary
Caching Configuration
next.config.ts
General caching rules reordered: first rule now matches all paths with public/CDN-aware Cache-Control policy; second rule narrows to /api/auth/* with private, no-store, no-cache directives. Reverses prior caching semantics.
Authentication Formatting
src/app/api/auth/[...all]/route.ts
Added empty line after arcjet import; no functional changes.
Logout Navigation Updates
src/components/modules/dashboard/nav-user.tsx, src/components/modules/profile/user-nav.tsx
Replaced window.location.href = "/" with router.refresh() followed by router.push("/") in logout success flows; added useRouter imports from next/navigation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #147: Directly modifies next.config.ts caching rules for /api/auth routes, addressing same header configuration areas.
  • PR #87: Updates next.config.ts NextConfig object with related caching/performance properties.

Poem

🐰 Hops through cached halls, auth routes secured tight,
Router guides the way when users say goodnight,
Headers reorganized, semantics flip and dance,
A cleaner navigation path, no more window prance!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch staging

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Owner Author

@chef0111 chef0111 left a comment

Choose a reason for hiding this comment

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

Just me approving myself

@chef0111 chef0111 merged commit c9c4e3d into main Feb 14, 2026
3 of 6 checks passed
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.

1 participant