Live data from Hacker News

Sick of spending time on Auth, we built an open source 'Stripe for Auth'

news.ycombinator.com

291–300 of 347 posts

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#291

My specific need is passwordless login (via email currently) to issue private keys for multi device end to end encryption. If you can do that, I'm in!

We had actually implemented email passwordless for our own website earlier. We havent launched it yet but are hoping to do so. i'd love to update you when we launch it. Please share your email ID or drop me an email at advait at supertokens.io and I'd be happy to let you know when we have it.

but with multi device E2E key pairs? That for me is the real challenge.

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#292

This is amazing! Wish you a lot of success. Will there be a way to submit feature requests, upvoting and you working on the most requested? Would be great if you would add user management, including profile photos and custom fields in the future. And SMS login.

Thank you!

We do keep track of all feedback and requests on a private Github repo and use that to prioritize. However, I agree - maybe we can have a public page where users can submit and vote for their preferences.

We're excited about user management too! We already have custom fields that you can add to the SuperTokens sign up / sign in form. We'll add passwordless soon after social login / email verification

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#293
post #188

For my little web app I just went with passwordless logins and did the "magic token sent to the inbox" thing. I no longer have to deal with passwords at all; a security breach is (mostly) useless in terms of mining creds; and all of the password handling workflows are now the email provider's problem. If someone loses access to an email account then I can use manual processes to verify the person and change the email…

Implemented this recently in my SaaS app, replacing passwords with magic links and it was a mistake. Sure, it has some obvious benefits: it forces users to always provide a valid email and logging in confirms that the email address is valid, without any additional logic.

But moving auth logic to email links has increased my customer support work significantly: "I can't log in", "I didn't get the link" complaints are quite common now. People use email they didn't sign up with, messages go to spam, arrive with a delay - or recently, gmail outage caused messages to hard-bounce. These are only some of the issues I've had to deal with in the last few weeks, that never came up when I had password auth.

Also, I've found that some email clients automatically follow links included in the message and that meant login link was invalidated before user got a chance to click it. I've solved it by adding a button on the page, but it's not ideal.

Magic links were supposed to be convenient, but they cause a lot of frustrations for some users. Keep that in mind.

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#294

Earlier quoted context omitted.

This is a debatable topic. We wrote a blog post about this as well: https://supertokens.io/blog/are-you-using-jwts-for-user-sess...

The benchmark in that article comparing JWT to opaque session id's doesn't mention what database setup is used or what JWT signing scheme is used. Presumably it's just using a HMAC, I think if it used RSA or an asymmetric signing scheme, the performance would look much different.

Yes. It was using HMAC. But I would still assume that RSA would be much faster than a db lookup (in a distributed system)?

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#295

Simple, JWT, pick one. Really don't understand the obsession with JWT, especially if you don't need SSO. Only real advantage of JWT, vs the tried and true random session_id+database approach, is that you don't need the DB. What useful web application needs auth, and doesn't already have a DB?

JWT has one useful feature indeed: it separates issuing the token from verifying the token. For verifying the token, all you need is the token and some simple JWT library that takes care of verifying the signature. You don't need network access, you don't need a custom service that you need to call into, etc. Especially if you have multiple services, this is great since it is low complexity and easy to understand. Add the header, check the signature, done.

Issuing the token is likewise very simple if you have users and passwords. Check some user/password combination that you store somewhere (bcrypt, obviously) and issue the token. I recently implemented this again for a startup. Took me an afternoon. Works. I also know how to add 2FA/TOTP to the mix (done that as well). Not that hard. All you need is a shared secret between the account and the totp token app.

The part that remains complicated is the signup and account verification process. It's depressing that people continue to use email verification + password signins simply because nobody wants to work together to federate identity. Email is merely the simplest form of federated identity where the check is basically "please prove that you can read the email we just sent you". Never mind that email providers come in all sorts of easily compromised forms and that that does not provide any additional guarantees about the individual. Believe me, I've dealt with bot created gmail, yahoo, and other accounts. Somebody owning a gmail account proves exactly nothing. So it's a weak check and people connecting their entire online life to a single email provider is an obvious security risk. Countless idiots out there with poorly protected gmail accounts and nothing but a stupidly insecure password that they use on every website to protect them. Perpetuating that is almost criminal at this point.

But it's relatively easy to do and everyone has an email address so people continue to do this. Phone operators briefly tried to take over with SMS verification but that got hopelessly complicated because they wanted to earn money per SMS and most of them were more than a bit security challenged thus making this more complicated, less convenient, and less secure than email verification. Even as a second factor some (e.g. MS recently) are recommending to stop doing phone verification.

I'd love to have some simple mechanism that would simply allow me to verify that "the holder of this token was authenticated by X". That's all I need. It doesn't have to be super complicated. Sadly OpenId and later OpenId 2.0 and OpenID Connect descended into design by committee stuff where the committee was populated by people with every incentive to guarantee vendor lock-in to their mutual proprietary solutions. Add your favorite trillion $ companies to the mix that each want to "own" their users for exploitation purposes and "simple" was ruled out as design goal for any of this. Nothing wrong with the original vision but there seems to be a lack of unambiguously standardized, easy to integrate, reliable identity providers (Banks, local government, etc.). The whole field is a mess where everyone does things slightly differently; thus necessitating middle men like Auth0 or AWS Cogito.

So, countless startups keep throwing in the towel in the ring and go "fuck it, email signup + passwords it is yet again". It's stupid, but it's also simple which is why it is so resilient. I know all this and yet I'm already down a path where I will soon have to implement this yet again. DYI security is not something we should have to do in 2021. But it seems it will remain common for some time.

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#296

Earlier quoted context omitted.

> I don't love this either, but it's basically the same inconvenience as having multi factor authentication turned on. MFA usually uses channels that are intended to be relative low latency (or that don't require realtime out-of-band transmission, like TOTP). Email, OTOH, isn't generally reliably low-latency

Is there a technical detail of email that I don't know about that makes it less low-latency than a text message? Email or text would work the same for this auth scheme anyway.

E-mail, especially when the MTA and MUA is connected to different environments, which requires relaying, could be particular slow (minutes, hours) if the e-mail hops on busy services.

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#297

I'm just in the process of setting up our Auth system now with cognito. It sure is painful! Looks like you guys have everything I need except social login.

We're building email verification and social login at the moment and would love to have it ready in time for you. When do you plan to launch your product by?

Hoping to launch in January

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#298
post #293
post #188

For my little web app I just went with passwordless logins and did the "magic token sent to the inbox" thing. I no longer have to deal with passwords at all; a security breach is (mostly) useless in terms of mining creds; and all of the password handling workflows are now the email provider's problem. If someone loses access to an email account then I can use manual processes to verify the person and change the email…

Implemented this recently in my SaaS app, replacing passwords with magic links and it was a mistake. Sure, it has some obvious benefits: it forces users to always provide a valid email and logging in confirms that the email address is valid, without any additional logic. But moving auth logic to email links has increased my customer support work significantly: "I can't log in", "I didn't get the link" complaints are…

I was bitten by this issue already two times. First time wth magic links via email. Suddenly your application depends on the mail infrastructure that sometimes is hard to "scale on demand" or even isn't under your control. Second time with OTP via SMS. Both incidents led us to be unreachable for long periods of time, and the SLA provided by our mail provider and telecom weren't really known until the incident. We assumed that everything would just work under high load.

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#299

Earlier quoted context omitted.

The benchmark in that article comparing JWT to opaque session id's doesn't mention what database setup is used or what JWT signing scheme is used. Presumably it's just using a HMAC, I think if it used RSA or an asymmetric signing scheme, the performance would look much different.

Yes. It was using HMAC. But I would still assume that RSA would be much faster than a db lookup (in a distributed system)?

[deleted]

Re: Sick of spending time on Auth, we built an open source 'Stripe for Auth'

#300

Earlier quoted context omitted.

The benchmark in that article comparing JWT to opaque session id's doesn't mention what database setup is used or what JWT signing scheme is used. Presumably it's just using a HMAC, I think if it used RSA or an asymmetric signing scheme, the performance would look much different.

Yes. It was using HMAC. But I would still assume that RSA would be much faster than a db lookup (in a distributed system)?

Perhaps, at least on the JDK[0] RSA can take a few ms, probably a fair bit faster with a native implementation though.

[0] https://www.javamex.com/tutorials/cryptography/rsa_key_lengt...

Post reply on HN