--- id: flask-dance version: "7.1.0" license: unclear license_treatment: permissive maintenance: dormant --- # Flask-Dance — Doing the OAuth dance with style using Flask, requests, and oauthlib License: permissive · Maintenance: dormant · Downloads: 1.2M/mo ## What it is and what it does Flask-Dance is a Flask extension that abstracts the OAuth consumer flow, letting you add OAuth-based login to your application with minimal boilerplate. It wraps requests, oauthlib, and requests-oauthlib to handle token exchange, refresh, and storage transparently. The package provides pre-configured blueprints for popular providers and a flexible API for custom providers. By default, tokens are stored in Flask's session, but the package supports pluggable storage backends—most commonly SQLAlchemy for persistent database storage. This prevents users from losing authentication when clearing browser cookies. The library integrates with Flask-SQLAlchemy, Flask-Login, and Flask-Caching, making it a natural fit for larger Flask applications that already use those extensions. Use it for: - Add OAuth login to a Flask app without writing OAuth flow code from scratch. - Implement persistent OAuth token storage in a database using the SQLAlchemy backend. - Support multiple OAuth providers in a single Flask application. - Integrate OAuth authentication with Flask-Login for user session management. - Build a custom OAuth integration for a non-standard provider using the flexible API. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Flask-Dance simplifies OAuth authentication in Flask applications by providing pre-built integrations with multiple OAuth providers and handling the token exchange flow automatically. Yes, for stable OAuth authentication needs in Flask apps. The package is mature, well-documented, and carries no known vulnerabilities. Dormant maintenance is acceptable here because OAuth flows are standardized and unlikely to require frequent updates. Install it if you need straightforward OAuth integration; avoid it only if you require active upstream development or support for very recent OAuth extensions. ## Install pip install flask-dance uv add flask-dance poetry add flask-dance ## Installing Flask-Dance Before you install: Low friction installation with a pure-Python wheel. Maintenance is dormant—last release was in March 2024—but the repository remains active with recent commits and no archived status. Suitable for stable use cases where OAuth integration doesn't need active development. License in practice: Licensed under MIT (permissive), allowing unrestricted use, modification, and distribution in both open-source and commercial projects. Quickstart: pip install Flask-Dance from flask import Flask from flask_dance.contrib.github import make_github_blueprint, github app = Flask(__name__) app.secret_key = "your-secret-key" blueprint = make_github_blueprint(client_id="id", client_secret="secret") app.register_blueprint(blueprint, url_prefix="/login") if github.authorized: resp = github.get("/user") print(resp.json()) Requires Flask app configuration with a secret key and OAuth provider credentials (client_id and client_secret). Verify before relying: - Whether the list of supported OAuth providers remains current given the dormant maintenance status. - Performance characteristics when handling high-volume token storage and refresh scenarios. - Compatibility with recent Flask and Werkzeug major versions beyond Python 3.7, 3.8, 3.9, 3.10. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags flask oauth authentication, oauth provider integration, flask login with github, oauth token management, flask oauth consumer, social login flask, oauth blueprint flask, oauth-consumer, flask-extension, authentication [View on SkillFed](https://skillfed.io/packages/flask-dance) · [View on PyPI](https://pypi.org/project/flask-dance/)