Skip to content
engineering workbench.by StudyPort Academy
Learning path
Intermediate18 min

Build vs buy

Understand the idea

A managed login stores the passwords. It does not know which note Ada may open.

The idea

Clerk, Auth0, Supabase Auth, and WorkOS-class services store passwords, issue cookies or tokens, rotate keys, and speak to Google or a company directory. That is the work this track just did by hand, and they have run the incident response more than you have. Self-hosting keeps the user table in your database, which you want when the data cannot leave your network or the login rules are unusual. It also means you own hash upgrades, breached-password response, and the on-call page. Buying does not finish the job. You still set the allowed redirect URLs, you still decide what a session may do inside the product, and you still need a degraded path if the vendor is unreachable. The vendor does not know that Ada may not read Bea's note.

What changes

Honest split of the work
QuestionSelf-hostedManaged service
Who stores the password hash?You do, and you rotate the algorithmThey do, if you leave the default in place
Who decides Ada cannot read Bea's note?Your handlerYour handler. Their login only identified Ada.
What breaks on a bad day?Your session store and your reset emailTheir outage, plus any redirect URL you configured wrong

The command

The vendor does not write your rules

3s timeout · one stateless run. Node and Express use Piston when that instance accepts the job (public EMKC execute is whitelist-only; set PISTON_URL or PISTON_TOKEN). Otherwise a local Node process. MongoDB uses a fresh in-memory server per run, then it is stopped.

The mistake

Check the result

The run prints that the vendor stores passwords, does not write your rules, and that you still configure redirects and own the product rules.

Guided challenge

Keep product rules on your side

writesYourRules is true, which claims the vendor decides authorization. Set it back to false. The print should say the vendor does not write your rules.

Keep product rules on your side

3s timeout · one stateless run. Node and Express use Piston when that instance accepts the job (public EMKC execute is whitelist-only; set PISTON_URL or PISTON_TOKEN). Otherwise a local Node process. MongoDB uses a fresh in-memory server per run, then it is stopped.

EXPECTED RESULT

vendor writes your rules false
you still own product rules true

Hints 0/2

    Use all hints or make 3 failed checks (0/3).

    Free exploration

    Change this example and run it again. Each run is a new process. Nothing is saved.

    Your variation

    3s timeout · one stateless run. Node and Express use Piston when that instance accepts the job (public EMKC execute is whitelist-only; set PISTON_URL or PISTON_TOKEN). Otherwise a local Node process. MongoDB uses a fresh in-memory server per run, then it is stopped.

    Quiz

    A quick check for understanding. Retry as often as you like; your learning path stays open.

    01What does a managed auth service typically take off your plate?
    02What do you still own with a vendor?

    Ready to call this one understood?

    Mark this lesson complete to earn 150 XP. You can always revisit it.

    Sign in to save progress
    Next lesson