Add user authentication to Flask applications using the GitHat REST API. JWT tokens, session management, and multi-org support for Python backends.
Flask applications can integrate GitHat auth via the REST API. Register users, issue tokens, and validate sessions by calling api.githat.io from your Flask routes.
Protect Flask routes by checking the Authorization header. Forward the Bearer token to GitHat's /auth/me endpoint to verify the user's identity and get their org context.
Build SaaS applications with Flask and GitHat. Each user can belong to multiple organizations with different roles (owner, admin, member). The API handles role-based access control.
pip install requests
# app.py
import requests
from flask import Flask, request, jsonify
app = Flask(__name__)
GITHAT_API = 'https://api.githat.io'
@app.route('/api/login', methods=['POST'])
def login():
data = request.json
resp = requests.post(f'{GITHAT_API}/auth/login', json={
'email': data['email'],
'password': data['password']
})
return jsonify(resp.json()), resp.status_code
Try GitHat free
Ship authenticated apps in minutes, not weeks.