Lurker News
We (my cofounder and I) have built several startups previously and spent an unnecessary amount of effort on auth. This led us to build an open source alternative to Auth0 and AWS Cognito, that’s called SuperTokens. We’ve spoken to 100s of developers and startups to understand the pain points with current services and we hope you find this useful!

Why did we build this? To be able to control our user data and have it stored in our own database. Have certain customisations that other identity providers do not offer We couldn’t afford to pay It took too long to understand the documentation of alternate service providers
How are we any easier? We think that Auth0, Firebase etc are great services but auth is complex. There are many different use cases for different types of apps. Since services have to cater to each of these, they tend to become complex in their implementation (due to no fault of their own).
SuperTokens takes a modular approach - making it possible to pick only the features you need for your use case. This means you need not worry about complications associated with other features (eg: SSO and OAuth if you don’t need it) and this in turn makes it easier to implement and manage SuperTokens.
We are still early in the journey and working hard on building more functionality.
Please see our website: https://supertokens.io/ Our GitHub: https://github.com/supertokens/supertokens-core
Do let us know what you think - specifically whether you would consider SuperTokens for your app. Why or why not? What can we change or offer?
PS: We did a "Launch HN" post earlier when our product was only for securely managing session tokens (https://news.ycombinator.com/item?id=24306572). We realized we need to build more of the auth stack (signup / signin, social login etc) and hence we're excited to announce that we've built basic login functionality.

Comments (339) 88 threads

Earlier comments
resthedev#
This is awesome! And it couldn't have come at a better time. I've been working on my own startup product and shopping around authentication platforms. Auth0 looks great but it's just damn expensive when you start getting more users. Appreciate this!
WatchDog2 replies#
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?

WatchDog1 reply#
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.

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

Continue this thread — 1 reply

jillesvangurp#
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.

headmelted2 replies#
“We couldn’t afford to pay It took too long to understand the documentation of alternate service providers”

These don’t seem like good reasons and would be enough to make me not want to use this until it already has a lot more real-world usage from others first.

advaitruia2 replies#
Thank you for your candid feedback. Those reasons were also echoed in our user research as we were dedicating ourselves to the project.

Could you please share why you think those arent good enough reasons? Ofcourse, social proof is important regardless. SuperTokens is being used in the real world, in production. Would you like to see more people using it or some recognizable entreprise brand names?

headmelted#
It's not the technique that makes me wary - it's that the way it reads is that you've built this because you found the documentation for existing solutions to be too complex which is a massive red flag with regards to anything security related.

Essentially it sounds like "doing security is hard so we did something simpler and ignored the complicated parts we couldn't understand".
As you've explained it above that's clearly not what you meant at all so maybe edit the website to call out a bit more clearly what your reasons are for building this and what other people's complaints are about existing systems? (Maybe in one of those side-by-side feature matrices showing the benefits of your implementation?)
Will definitely check this out when I have some time though!

advaitruia#
Actually we offer the most secure way of managing session tokens. We were the first provider to implement token theft detection using rotating refresh tokens (and most still dont). Auth0 even uses one of our libraries for solving for edge cases. I dont think that good security = complex documentation. Its about the way you abstract away the complexity.

Will factor your feedback when we design the website and think about communication.
Please do let me know when you've had a chance to check it out. Would be happy to hear your feedback

xupybd#
It makes sense to me. Here is my understanding of what they are trying to say:

"The existing services were either too expensive or too complex, we thought we could do better"
That is a typical iterative product design that many companies choose.

DreamFlasher1 reply#
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.

advaitruia#
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

Load more comments