elynox.template.quartz-vault-template

Not logged in
Home

❯

Protected Content Example

Protected Content Example

Aug 01, 20251 min read

Protected Content Example

This page demonstrates Auth0 authentication in Quartz. Only authenticated users with “admin” or “editor” roles can view this content.

Features Demonstrated

  1. Page-level Protection: This entire page requires authentication via the auth: true frontmatter property
  2. Role-based Access: Only users with specific roles can view this content
  3. Seamless Integration: Authentication is handled transparently by Auth0

How It Works

The protection is configured in the frontmatter:

---
title: "Protected Content Example"
auth: true
roles: ["admin", "editor"]
---

Configuration Options

  • auth: true - Enables authentication requirement for this page
  • roles: ["role1", "role2"] - Optional array of required roles
  • If no roles are specified, any authenticated user can access the page

Next Steps

You can protect any page in your Quartz vault by adding the appropriate frontmatter. The Auth0 integration handles:

  • User authentication
  • Session management
  • Role verification
  • Automatic redirects

For partial content protection within a page, use the ProtectedContent component.


Loading authentication...

Graph View

  • Protected Content Example
  • Features Demonstrated
  • How It Works
  • Configuration Options
  • Next Steps

Backlinks

  • Welcome to Quartz

Created with Quartz v4.5.1 © 2025

  • GitHub
  • Discord Community