Dax Raad Profile picture
Apr 27 9 tweets 2 min read Twitter logo Read on Twitter
lots of talk about auth being easy to roll yourself

i’ve tried to use every managed auth provider i could find and i always ended up doing my own thing

and it has nothing to do with it being easier or even cost

there’s an entirely different problem

thread boi time
when you look at these auth solutions they typically will handle three things

1. handshakes with third party IDPs (login with google, etc)
2. session management
3. user storage

1+2 are boring and i’m 100% down to offload it to someone else

the problem is #3
every managed auth provider eventually wants to store your users for you

reason being solving 1+2 isn’t a sticky pitch and can be done by an open source library

but if you’re doing user storage you can start to offer all kinds of attractive features

but there’s a trade off
imagine you’re building reddit where people can comment on links

to render a page of comments you need the comments themselves and information about the author like name, picture, etc

if all that is in a single database you can use joins to efficiently get this info
but when user storage is stored elsewhere you need to do that join in the application by first fetching comments from your db then filling the author info from third party

this is a lot slower - you probably can’t even guarantee these users are stored in the same data center
it’s also more annoying and likely impacts a lot of your features

you lose any ability to do transactional updates between user data and app specific data

i use @replicache which has strict transactional requirements and it’s literally impossible to use third party user storage
what you’re effectively doing is deciding to use a secondary database for some data you probably need to access often

and that effectively introduces a bunch of distributed systems problems you don’t want to deal with - basically all the reasons people tell you not to use NoSQL
so that’s why i end up doing my own auth

plenty of tools to make 1+2 painless and no one can actually solve 3 for me for anything even moderately complex
as usual a bunch of you are missing the point in your eagerness to have a smart reply

to clarify the main point here is auth as a service businesses want to do 3 for you and you should think twice

as i said in the thread offloading 1+2 (many flavors of this) is totally fine

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dax Raad

Dax Raad Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @thdxr

Jan 16
keep seeing a certain doomed product being built over and over

why?

it's a funny mix of getting certain things absolutely right while missing something a bit obvious

1/x
the product I'm talking about is visual drag and drop tools to build up your infrastructure

we've seen it with Stackery (dead), AWS Application Composer (doa), Massdriver (tbd) to name a few

the idea starts with "why can't I just ship my high level architecture diagrams?"

2/x
the part that's right about this idea is that

1. most companies don't need bespoke infra, they're running similar patterns and just need best practices with minimal configuration

2. you want a high level abstraction to configure these patterns

3/x
Read 9 tweets
May 19, 2021
It's easy to make the same old jokes about NoSQL but there's a much more important lesson to learn of how it tragically became a punchline in the first place.

Story time...
Back in the early 2010s a PAAS company called 10gen decided to pivot. They were going to narrow their focus and develop a new kind of database that they named MongoDB
At this point most software engineers only had experience building with SQL databases. The cloud was new and exciting with a whole lot of companies being founded. People were open to a paradigm shift.

10gen needed a strategy to position MongoDB at the forefront of this new wave
Read 15 tweets
Jun 20, 2019
Here's a thread putting frameworks like #reactjs in context of why they exist and thinking about where to go next
Start by forgetting React and writing a simple UI with vanilla JS like a troglodyte. This is as performant as can be as it only mutates the element that needs to be changed Image
But as more elements need to change based off this event it starts to get messy and hard to manage especially if your UI is broken up into multiple files Image
Read 14 tweets
Feb 9, 2019
Imagine a world with 100 people who each produce and consume one apple every year. If someone invents a way to double output and takes half of everyone's second apple they become obscenely wealthy (50 apples a year). Still, everyone is much better off

This is wealth creation
Now that it's easier to produce the one apple needed, everyone can spend a portion of their time working on something else. Maybe even faster apple production methods or something unrelated to apples, like medicine or entertainment

This is how wealth creation compounds
There is another way to get rich. Someone can lobby the apple government to limit the number of apple grower licenses. They gain control of a once decentralized apple market and enrich themselves without creating any new apples.

These are the rent seekers we should destroy
Read 4 tweets
Jan 4, 2019
With all the talk about regulating Facebook, it's a good time to consider the difference between horizontal and vertical regulation

Thread 👇
Regulation tends to be horizontal. It identifies specific effects of the company, i.e. privacy violations, and attempts to create rules horizontally for the entire market
As many have noted with GDPR, the large companies it was created for can easily afford compliance while smaller companies have a new barrier to competing.

Horizontal regulation is conservative about disrupting large players at the expense of everyone else, aka regulatory capture
Read 6 tweets
Jul 25, 2018
Things I've learned engineering at startups:
Complexity is a permanent part of the world. Technology claiming to eliminate complexity is actually shifting it elsewhere.
The best design is the one that allows for better design later.
Read 15 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(