Skip to content

Fix/next auth config types#471

Open
STRANGENIKHIL wants to merge 2 commits into
piyushdotcomm:mainfrom
STRANGENIKHIL:fix/next-auth-config-types
Open

Fix/next auth config types#471
STRANGENIKHIL wants to merge 2 commits into
piyushdotcomm:mainfrom
STRANGENIKHIL:fix/next-auth-config-types

Conversation

@STRANGENIKHIL
Copy link
Copy Markdown

@STRANGENIKHIL STRANGENIKHIL commented Jun 4, 2026

Summary

auth.config.ts: Replaced the import of NextAuthConfig from next-auth with AuthConfig from @auth/core, and updated the satisfies helper type accordingly.

Dockerfile.collab: Changed the command COPY next-auth.d.ts ./ to COPY types/ ./types/ to reflect the relocation of the declaration file.

Type of change

-Bug fix

Closes #455

Screenshots or recordings

image

Summary by CodeRabbit

  • Chores
    • Removed example configuration file
    • Updated Docker build configuration
    • Removed debug logging output for real-time collaboration events
    • Updated authentication configuration type definitions

@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

👋 Thanks for opening a PR, @STRANGENIKHIL!

Your PR has entered the 🚦 PR Review Pipeline.

Standard PR detected — your PR will follow the standard review pipeline.


What happens next

Stage Reviewer Checks
Stage 1 — Automated Validation 🤖 Bot DCO · Format · AI/Slop · Duplicate
Stage 2 — Human Review 👥 Maintainer Code + Quality Review
Stage 3 — PA / Maintainer Review 🔑 Project Admin Final Merge Decision

A pipeline status comment will appear below and update automatically as your PR progresses.


While you wait

  • Sign all commits (git commit -s)
  • Link your issue (Closes #123)
  • Use a feature branch (not main)
  • Avoid unrelated changes

This comment is posted only once.

@github-actions github-actions Bot added the bug Something isn't working label Jun 4, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d3486c4c-702f-4e26-bfeb-d9757d232792

📥 Commits

Reviewing files that changed from the base of the PR and between f12b223 and f8e0267.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • .env.example
  • Dockerfile.collab
  • auth.config.ts
  • lib/yjs.ts
💤 Files with no reviewable changes (2)
  • .env.example
  • lib/yjs.ts

Walkthrough

This PR migrates authentication configuration from the next-auth package to @auth/core, updates the Docker build to copy the types directory instead of a single type definition file, and removes debug event logging from Yjs provider initialization.

Changes

Auth migration and build cleanup

Layer / File(s) Summary
Auth type migration to @auth/core
auth.config.ts, Dockerfile.collab
auth.config.ts imports AuthConfig from @auth/core instead of NextAuthConfig from next-auth, and updates the exported config's satisfies type assertion. Dockerfile.collab copies the types/ directory into the image instead of next-auth.d.ts.
Remove Yjs provider debug logging
lib/yjs.ts
getOrCreateYDoc removes the synced and status event listener registrations on the WebsocketProvider, eliminating console logging during provider initialization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • piyushdotcomm/Editron#371: Both PRs modify lib/yjs.ts by removing the WebsocketProvider synced/status console logging listeners in getOrCreateYDoc.
  • piyushdotcomm/Editron#218: The Yjs logging removal and Docker types directory change are tied to the y-websocket API shift away from the WebsocketProvider class.

Suggested labels

type:bug, type:devops, type:refactor, quality:exceptional

Suggested reviewers

  • piyushdotcomm

Poem

🐰 From next-auth to @auth/core we hop,
Type migrations complete, no more compile-stop!
Docker copies types with careful precision,
Yjs logs gone quiet—debug's final decision.
Four small fixes, one steady change—
The codebase blooms in this autumn range! 🌰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes two out-of-scope changes: removal of .env.example content and removal of WebsocketProvider event listeners in lib/yjs.ts, which are not related to issue #455's auth configuration fix. Remove changes to .env.example and lib/yjs.ts as they are unrelated to the auth configuration type fix. Focus the PR on the auth.config.ts and Dockerfile.collab changes only.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix/next auth config types' directly relates to the main change of updating auth.config.ts type imports from NextAuthConfig to AuthConfig, addressing the primary bug fix objective.
Description check ✅ Passed The description includes a summary of changes, type of change designation, and linked issue, but is missing required validation checklist items (npm run lint, npm test, npm run build confirmations) and manual verification details.
Linked Issues check ✅ Passed The PR successfully addresses the TypeScript error in issue #455 by replacing NextAuthConfig import with AuthConfig from @auth/core in auth.config.ts, fully resolving the reported compilation error.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] TypeScript error: Module '"next-auth"' has no exported member 'NextAuthConfig' in auth.config.ts

1 participant