Skip to main content

Shared user management and auth for flyfun services

Project description

flyfun-common

Shared user management and authentication library for flyfun services.

Provides OAuth login (Google, Apple), JWT session management, user database models, and API token administration — all as reusable FastAPI components.

Installation

pip install flyfun-common

Usage

from fastapi import FastAPI
from flyfun_common.auth import create_auth_router
from flyfun_common.db import init_db

app = FastAPI()

# Initialize database
init_db()

# Mount the auth router
app.include_router(create_auth_router())

Configuration

All configuration is via environment variables:

Variable Required Description
JWT_SECRET Production Secret key for signing JWT tokens
DATABASE_URL No SQLAlchemy database URL (defaults to local SQLite)
ENVIRONMENT No production or development (default)
COOKIE_DOMAIN No Cookie domain for cross-subdomain SSO
GOOGLE_CLIENT_ID No Google OAuth client ID
GOOGLE_CLIENT_SECRET No Google OAuth client secret
APPLE_CLIENT_ID No Apple Sign In service ID
APPLE_TEAM_ID No Apple Developer Team ID
APPLE_KEY_ID No Apple Sign In key ID
APPLE_PRIVATE_KEY No Apple Sign In private key (PEM)
CREDENTIAL_ENCRYPTION_KEY Production Fernet key for encrypting stored credentials

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flyfun_common-0.6.2.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flyfun_common-0.6.2-py3-none-any.whl (57.7 kB view details)

Uploaded Python 3

File details

Details for the file flyfun_common-0.6.2.tar.gz.

File metadata

  • Download URL: flyfun_common-0.6.2.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for flyfun_common-0.6.2.tar.gz
Algorithm Hash digest
SHA256 f38d82b33eb1e7d02bc5c89505ba53cc94bdbc8738b1ca2b84ca374ec57d1a49
MD5 13539c46d30141efb54617bb0fdc2d6e
BLAKE2b-256 d413eec8d47e2519460987e53739b503cbda4fcd9ef8ef82c892400f0874c41b

See more details on using hashes here.

File details

Details for the file flyfun_common-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: flyfun_common-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 57.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for flyfun_common-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a75b1a8cfc7299364eae61b8e25fffff8feb5ddbee5a80412d1e974c6d9c464
MD5 bc758c095f378e6eefc7ac0aca9104d8
BLAKE2b-256 0ff3a6aa575c5f77add7932bbfbeeda0b4e50d42c1abf1f02f7ca9c829f1a854

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page