Customization

Modify Authority's appearance with Jinja templates.

Overview

Authority uses Crinja (Jinja2-compatible) templates for all pages:

  • Login / Registration

  • OAuth consent

  • Password reset

  • Admin dashboard

  • User profile

Template Structure

public/
├── templates/
│   ├── layout.html          # Base layout
│   ├── signin.html          # Login page
│   ├── signup.html          # Registration
│   ├── authorize.html       # OAuth consent
│   ├── activate.html        # Device activation
│   ├── forgot-password.html # Password reset request
│   ├── reset-password.html  # Password reset form
│   ├── errors.html          # Error messages
│   └── emails/              # Email templates
│       ├── verification.html
│       ├── password-reset.html
│       └── welcome.html
├── css/
│   └── styles.css           # Main stylesheet
└── js/
    └── app.js               # Client JavaScript

UI Components

spinner

Template Syntax

Variables

Conditionals

Loops

Template Inheritance

Base layout (layout.html):

Page template (signin.html):

Available Variables

Sign In Page

Variable
Description

forward_url

Redirect URL after login

error

Error message

username

Previously entered username

Authorization Page

Variable
Description

client_name

OAuth client name

client_id

Client identifier

scopes

Requested scopes

redirect_uri

Callback URL

state

CSRF state parameter

Device Activation

Variable
Description

user_code

Pre-filled code

audience

Client name

error

Error message

Styling

CSS Variables

Custom Theme

Create a custom theme:

Screenshots

Landing Page

Landing Page

Sign In

Sign In

Admin Dashboard

Admin Dashboard

Configuration

Custom Template Path

Reload Templates

In development, templates reload automatically. In production:

Best Practices

circle-check
circle-exclamation

Next Steps

Last updated

Was this helpful?