Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pages configuration #10288

Merged
merged 6 commits into from Mar 25, 2024
Merged

Conversation

chungweileong94
Copy link
Contributor

@chungweileong94 chungweileong94 commented Mar 12, 2024

☕️ Reasoning

Currently, in the latest next-auth v5, if you customize the error page to /auth/error in the pages config, next-auth will redirect to http://localhost:3000/api/auth/auth/error instead of http://localhost:3000/auth/error

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Fixes: #10289

📌 Resources

Copy link

vercel bot commented Mar 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2024 2:28pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2024 2:28pm

Copy link

vercel bot commented Mar 12, 2024

@chungweileong94 is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.40%. Comparing base (86c8822) to head (15abe3a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10288      +/-   ##
==========================================
+ Coverage   39.38%   39.40%   +0.02%     
==========================================
  Files         171      171              
  Lines       27285    27286       +1     
  Branches     1159     1167       +8     
==========================================
+ Hits        10745    10752       +7     
+ Misses      16540    16534       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThangHuuVu
Copy link
Member

could you add a test for it @chungweileong94 ? 🙏 otherwise LGTM

@chungweileong94
Copy link
Contributor Author

@ThangHuuVu Just added the test in callback.test.ts, not sure if this is the right place to put my test.
Sorry that I was AFK for the weekend.

@maytees
Copy link

maytees commented Mar 18, 2024

Is there a temporary work around to this in the meantime by any chance? If not, when will the fix be released?

@chungweileong94
Copy link
Contributor Author

chungweileong94 commented Mar 18, 2024

Is there a temporary work around to this in the meantime by any chance? If not, when will the fix be released?

I'm currently using pnpm patch to patch the package directly. Or you can use patch-package if you are using other package manager than pnpm

@ThangHuuVu ThangHuuVu merged commit 9c56e69 into nextauthjs:main Mar 25, 2024
13 of 15 checks passed
@chungweileong94 chungweileong94 deleted the fix-pages-config branch March 26, 2024 02:30
JipSterk pushed a commit to JipSterk/next-auth that referenced this pull request Apr 3, 2024
* fix: pages configuration

* fix: typo

* chore: test custom pages config

---------

Co-authored-by: Thang Vu <hi@thvu.dev>
JipSterk pushed a commit to JipSterk/next-auth that referenced this pull request Apr 3, 2024
* fix: pages configuration

* fix: typo

* chore: test custom pages config

---------

Co-authored-by: Thang Vu <hi@thvu.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pages configuration doesn't work in NextAuth V5
3 participants