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(#808): only add error to response when it is set #809

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

zoey-kaiser
Copy link
Member

πŸ”— Linked issue

Potentially closes #808

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

After being redirected to the login page, the URL looks like this: http://localhost:3000/login?callbackUrl=http://localhost:3000/dashboard&error=undefined

The error query parameter is undefined, and I would like to change this to a specific error message or remove it altogether.

We wrap the error heading in String() and add a fallback to undefined if it does not exist. However, transferring an error to a string will always result in it being set, as the wrapper undefined in string results in a string that is undefined, which lines up with the path generated!

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@zoey-kaiser zoey-kaiser requested a review from phoenix-ru July 16, 2024 16:12
@zoey-kaiser zoey-kaiser added bug A bug that needs to be resolved provider-authjs An issue with the authjs provider labels Jul 19, 2024
@phoenix-ru phoenix-ru merged commit ec966a5 into main Aug 1, 2024
5 checks passed
@phoenix-ru phoenix-ru deleted the 808-fix-error-in-redirect branch August 1, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that needs to be resolved provider-authjs An issue with the authjs provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with NextAuth Authentication and URL Redirection in Nuxt.js
2 participants