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 Middleware Not Returning Extended Props #1

Merged

Conversation

ConnorC18
Copy link
Contributor

Fix Middleware Not Returning Extended Props

Overview

Implemented the changes from nextauthjs/next-auth#9836

Changes

  • Moved All NextAuth configuration into auth.config.ts
  • Moved All prisma calls from middleware into independent functions
  • Added better typing for JWT & Session User.

Proof?

Image from the console using the existing log
Proof

Have fun!

- Moved All NextAuth configuration into auth.config.ts
- Moved All prisma calls from middleware into independent functions
- Added better typing for JWT & Session User.
Copy link
Owner

@AmphibianDev AmphibianDev left a comment

Choose a reason for hiding this comment

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

WOW, I can't thank you enough. I never thought that was the problem, and not only that, but you even arranged and added comments for the types in next-auth.d.ts. 10/10, I am so grateful!
I am the same age as you, but I must say, you are way better, If you ever need something, feel free to ask, I will do my best to help.

@AmphibianDev AmphibianDev merged commit a4d2f03 into AmphibianDev:main Feb 9, 2024
@ConnorC18
Copy link
Contributor Author

ConnorC18 commented Feb 9, 2024

You're very welcome @AmphibianDev after my original fix didn't work and you sent your repo I was too intrigued to NOT fix it 😂. Being similar age, on the chance happen to have discord feel free to send over a friend request [REDACTED]. And I'll keep the offer in mind, thank you!

Edit:I removed the discord ID to avoid getting spam from others. I hope you don't mind.

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.

None yet

2 participants