News for hackers. Stuff that matters.
Re:Show HN: The most comprehensive authentication library fo... by 9dev on Saturday September 28, 2024 @02:29PM (#41682072)
With direct dependencies on Node.js modules, you outright prevent using other runtimes like Cloudflare workers, Deno, etc.

Node has decent support for WebCrypto, for example, which renders all usages of node:crypto obsolete.

At this point, I’d also argue that anything not promoting PassKeys as the default method is on the wrong track.

Re:Show HN: The most comprehensive authentication library fo... by forty on Saturday September 28, 2024 @04:10PM (#41682649)
node:crypto seems to be supported by Deno's compatibly layer
Re:Show HN: The most comprehensive authentication library fo... by bekacru on Saturday September 28, 2024 @03:08PM (#41682329)
The only place where "node" is necessary is for password hashing, as there’s no cryptographically secure way to hash passwords on CF Workers or other edge runtimes. So, there really isn't any other option. At this stage of the project, supporting Deno isn't a priority but for those not using email and password auth, CF Workers and other edge/serverless runtimes should work just fine
Re:Show HN: The most comprehensive authentication library fo... by trescenzi on Saturday September 28, 2024 @05:26PM (#41683117)
Is there a reason the web crypto api doesn’t work?

CF workers support it: https://developers.cloudflare.com/workers/runtime-apis/web-c...

Most browsers support it: https://developer.mozilla.org/en-US/docs/Web/API/Crypto

Re:Show HN: The most comprehensive authentication library fo... by maxbond on Saturday September 28, 2024 @06:11PM (#41683312)
(I am not a cryptographer.)

None of the hashes available in webcrypto's digest() are suitable for storing passwords (eg it doesn't support argon2, scrypt, bcrypt, or PBKDF2). They are all SHA family hashes.

https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypt...

You can use PBKDF2 through the deriveKey() function. So you could use that to store passwords. However, this is the least preferred of the acceptable algorithms, and is only recommended for use in scenarios where you must follow a standard that mandates the use of PBKDF2.

Re:Show HN: The most comprehensive authentication library fo... by pmdfgy on Saturday September 28, 2024 @06:11PM (#41683307)
You can rename the project to "The most comprehensive authentication library for node" then.
Re:Show HN: The most comprehensive authentication library fo... by dagmawibabi on Saturday September 28, 2024 @03:02PM (#41682288)
Better auth has passkeys
Re:Show HN: The most comprehensive authentication library fo... by Danjoe4 on Saturday September 28, 2024 @11:43PM (#41684736)
Noone uses passkeys
Re:Show HN: The most comprehensive authentication library fo... by willio58 on Sunday September 29, 2024 @01:58AM (#41685240)
As someone who literally jumps on any passkey I see given to me as an option - I hope people are using them because I just want to use them more.

Passwords are dumb for most use cases. They’re okay if you follow best practices, the thing is 99% of people don’t. So most people re-use passwords, and if asked to create new ones they append a character or something ineffective.

No thanks, just do a LiDar scan of my face and get me into Netflix please.

Re:Show HN: The most comprehensive authentication library fo... by mhuffman on Sunday September 29, 2024 @04:39AM (#41685839)
>Passwords are dumb for most use cases. They’re okay if you follow best practices, the thing is 99% of people don’t. So most people re-use passwords, and if asked to create new ones they append a character or something ineffective.

This may be dependent on your social. Everyone I know uses password managers, even at work. So they have different passwords for every account and browser/phone extensions or apps to fill them in.

Re:Show HN: The most comprehensive authentication library fo... by 9dev on Sunday September 29, 2024 @04:40PM (#41690277)
That only solves half of the problem though. Since many people do not use password managers (and thus potentially reuse their passwords, there's still an incentive to obtain stored password hashes. With passkeys, the public keys stored in any given provider's database are useless—so any provider switching to Passkeys rids themselves of a big attack vector. Just think about a possible feature without rainbow tables, large credential leaks, and so on. That's what Passkeys enable.
Re:Show HN: The most comprehensive authentication library fo... by radicalriddler on Monday September 30, 2024 @01:16AM (#41693758)
I mean, Cloudflare's done a lot of work in polyfilling a lot of node_compat stuff.

The only one is generally password hashing. At this point, I just run up a service binding to a rust worker and hash it over there.