Day 1: Getting Started with Kinde Auth and Eventual Consistency.

AurélieAurélie
3 min read

Today marks Day 1 of building a full-stack SaaS app using a modern stack.
I’m following a tutorial, but I’m also pausing to understand what I’m using, not just copy-pasting.
Here are two key takeaways from today: Kinde Auth and Eventual Consistency

Kinde Auth

I have used a couple of auth providers out there, e.g., Superbase, Firebase, and JWT. In today’s stack, we used Kinde Auth. For context, I'm using Next.js App Router with no middleware; it was by far the smoothest setup I've ever done, taking approximately 20 minutes.

Why does auth matter in SaaS? I think it is great for an early stage of development.

FeatureProsCons
Setup ExperienceLightning fast under 20 minsLimited customization in UI flows
DashboardIntuitive and cleanMissing bulk user actions
Auth OptionsSupports SSO, passwordless, and social loginsA smaller community for edge cases needs more cross-browser testing
Browser BehaviourChrome solid; Firefox login quirksNeeds more cross-browser testing
DocsSDK guides are decent
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";

const { getUser } = getKindeServerSession();
const user = await getUser();

Kinde Auth was fast to set up, but it doesn't offer nearly as many tools as Superbase, which I've used before. Superbase includes email verifications and allows you to customize the email template. Additionally, it provides various other features, such as forgot password and reset password routes. Kinde feels more minimal out of the box, which is perfect for lean MVPs!

Still exploring — curious to see how Kinde scales as I go deeper.

Resources: Next.js App Router SDK - Kinde docs

Eventual Consistency

🧠 What is Eventual Consistency?

Eventual consistency is a concept from distributed systems and databases. It refers to a consistency model where, after a write or update, not all parts of the system reflect the change immediately. However, if no new updates occur, all components will eventually converge to the latest state.


🧩 How This Applies to My Code

In my app, user authentication and database syncing are decoupled, which means:

  • When a user logs in for the first time, they're not yet in our database.

  • We rely on a webhook (a background process) to notify our backend about the new user.

  • At this point:

    • If the user already exists in the DB, they can proceed to the dashboard.

    • If not, we provision the user (sync their data to the DB).

  • Only after the user exists in our DB do we allow them access to the dashboard.


🌀 Why This Is Eventual Consistency

This setup is eventually consistent because:

  • The user system (e.g., Auth provider like Kinde/Auth0) and our app database are not immediately in sync.

  • The webhook acts as the sync mechanism, and there's a small delay before consistency is reached.

  • But, given no interruptions, both systems will eventually reflect the same user state.


🛠️ Implication

This pattern is common in modern distributed systems, especially when:

  • You're using third-party auth services.

  • Your app needs to react to changes (like signups or billing events) via asynchronous webhooks.

  • You want to decouple authentication from internal app logic for flexibility and scalability.

That’s Day 1 — a fast Kinde Auth setup, a brush with eventual consistency, and lots of backend thinking. Tomorrow I’ll dive into why I’m leaning into tRPC and how it’s reshaping my API flow. Stay tuned. If you have any tips or feedback, leave them in the comments!

1
Subscribe to my newsletter

Read articles from Aurélie directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Aurélie
Aurélie