auth0-flask

Official

Session-based Auth0 integration for Flask

Authorauth0
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provides a complete, production-oriented workflow to add session-based authentication to Flask web applications, removing uncertainty about secure login, callback, profile, and logout flows.

Core Features & Use Cases

  • ServerClient Initialization: Guides configuring ServerClient with domain, client_id, client_secret, secret, and redirect_uri for secure OAuth/OIDC flows.
  • Session Stores: Shows stateless cookie sessions and stateful Redis-backed sessions via custom FlaskSessionStateStore and FlaskSessionTransactionStore implementations.
  • Async Routes & Security: Covers async Flask route handlers, session cookie hardening, JWE-encrypted session data, and best practices for environment-based secrets and callback configuration.
  • Use Case: Add secure login, profile, and logout to a server-rendered Flask app that needs short-term access tokens and optional API audience access.

Quick Start

Install required packages, create a .env with AUTH0_DOMAIN, AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_SECRET, and AUTH0_REDIRECT_URI, wire the provided FlaskSessionStateStore and FlaskSessionTransactionStore into a single ServerClient instance, and add async login, callback, profile, and logout routes.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: auth0-flask
Download link: https://github.com/auth0/agent-skills/archive/main.zip#auth0-flask

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.