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.1.0.tar.gz (12.8 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.1.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for flyfun_common-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b4167e6102dfe9b8192449fbf9ef89bf5ab85e1352a068f35a5f992c5e3acf27
MD5 aa76ebe9c20441a58a69032bb89251ca
BLAKE2b-256 ba030f5a64f0c0d591529e1b2e6eb09df60d5e26efc44a5e4bb5125e2d70cacc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for flyfun_common-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4abb721d3f562eeb3eb8850f7e6ee782c06d57f15f5ab0ad38beef5f0747fe1d
MD5 45035cbd9aadb3aa39df76ff2317e4d9
BLAKE2b-256 b7fa873e1775c2bde4b9f279cfd0133b97c1414e13d6af74b248575099ed5c95

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