Skip to content

Restrict NextAuth debug mode to development environment - #84

Merged
shammy911 merged 2 commits into
KavinduSDfrom
copilot/sub-pr-79-one-more-time
Mar 20, 2026
Merged

shammy911 merged 2 commits into
KavinduSDfrom
copilot/sub-pr-79-one-more-time

Conversation

Copilot AI commented Mar 20, 2026 •

Copy link
Copy Markdown
Contributor

debug: true was hardcoded in the NextAuth config, causing verbose internal logs to be emitted in production — a potential source of operational and security-relevant information leakage.

Change

  • app/api/auth/[...nextauth]/route.ts: Gate debug mode on NODE_ENV:
// Before
debug: true,

// After
debug: process.env.NODE_ENV === "development",

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: shammy911 <180457932+shammy911@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback from review comments on 'Kavindu sd' pull request Restrict NextAuth debug mode to development environment Mar 20, 2026
Copilot AI requested a review from shammy911 March 20, 2026 06:33
@shammy911
shammy911 marked this pull request as ready for review March 20, 2026 07:03
@shammy911
shammy911 merged commit 503cb55 into KavinduSD Mar 20, 2026
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