Authentication on Static Infrastructure

Static file hosting is Netlify's core strength, but the platform extends well beyond serving HTML and CSS. Any Jamstack site can support dynamic, user-driven features like a TODO app with accounts—without provisioning or managing a dedicated server.

The Identity Layer

User sign-up and login on a static site is handled by Netlify Identity, an authentication service that requires only a few clicks to enable in the admin UI. To avoid building auth UI from scratch, Netlify supplies off-the-shelf widgets that plug directly into your pages.

Showing a login widget powered by Netlify Identity.

Storing User Data

Once a user is authenticated, your app still needs somewhere to persist data—for example, the items on a user's TODO list. That storage sits outside Netlify. A long-standing option is Fauna, which has had first-class integration with Netlify for years.

Securing API Access with Functions

Communicating with Fauna from a purely static site means using JavaScript in the browser. Directly exposing your Fauna API keys in client-side code is unsafe, so Netlify serves a server-side JavaScript layer called Netlify Functions—effectively managed Lambda functions. These functions handle the Fauna communication, keeping your API keys out of the browser and under your control.

A Proven Jamstack Pattern

Combining Identity, Functions, and an external database is a well-established Jamstack architecture, not an experimental one. Netlify maintains starter projects for this exact setup, such as netlify-fauna-todo-app and netlify-faunadb-example. A tutorial on authenticating and authorizing functions walks through the same flow, with a one-minute video demo available as well.

The end result is a site with the same dynamic behavior as a traditionally server-rendered application, but deployed through Git commits with automatic build previews—all the standard Netlify conveniences stay intact.