Replies: 4 comments 4 replies
-
It's not an issue, you're polluting, open a discussion, if it gets a lot of up they might reconsider the credentials provider. |
Beta Was this translation helpful? Give feedback.
-
Worth cross-linking to #6177. To be clear up front: I greatly respect the maintainers here, and their reasoning for taking their stance is understandable. However, I have concrete concerns about the current situation, which I'll share below. Use CasesThere are multiple perfectly valid use cases for using normal credentials:
Why the current setup is insufficient@balazsorban44 noted in #6177 (comment)
This is, unfortunately, insufficient. As was mentioned in the OP of that issue, people are still going to do it but worse. JWT has security downsides compared to generated session tokens, but AuthJS users will either just use it because that's what's included out of the box, or they'll implement their own session token handling, effectively rolling their own auth when this library already handles it but not in a way that is able to be accessed by consumers. The existing setup would only be sufficient if, eg, AuthJS's built-in non-jwt session handling was able to be used when configuring CredentialsProvider. Additionally, if AuthJS also handled the credentials from end to end, including things like configuring the password hash to be used, that would further ensure anyone using it would be using a well-configured implementation. As-is, the individuals who you're trying to discourage using it because they don't know the implications have a decent chance of doing it anyway but wrong, and those who know better but still need it are stuck between an inferior implementation or having to roll their own. IMO, it's better to have a few people do something that may not be ideal but in a validated manner vs having fewer people using it but having their implementations be much more liable to have serious security issues. |
Beta Was this translation helpful? Give feedback.
-
I've been struggling with this... I understand providing the whole backend for password support is a challenge... Hashing, Salting, Password reset, then email verification. |
Beta Was this translation helpful? Give feedback.
-
The thing is that by limiting Credentials Provider to JWT, they actually make it less secure since. If a dev wants to really have Credentials login then they will either go woith the hassle create a work around themselves and maybe they will even do it correctly (but some will also not), or they will just use JWT. As a user of a service that uses JWTs, you have no control over people logged into your account. You can't really invalidate JWTs and passwords are stored in the database either way. |
Beta Was this translation helpful? Give feedback.
-
Description 📓
I understand that the developers of this library agree that password authentication is generally less secure and more error prone than password-less methods. And I agree with that.
However, developers who want to use password authentication are going to do it anyway. Many of us have no say in the matter; we implement the features we're told to implement.
The developers of next-auth are correct, password authentication is less secure. However, a password auth solution developed as a first-class citizen as part of this library would be far more secure than the various kludgy workarounds that developers are hammering the Credential Provider into, mangling JWT handling to trick the system into saving sessions to a database.
Discouraging the use of passwords in this way is like discouraging people from speeding by eliminating seat-belts and airbags from your vehicle design. This is not making web-applications more secure, and should be reconsidered.
Thanks for taking the time to read this.
How to reproduce ☕️
This behavior is by design, unfortunately.
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions