Skip to main content

Authentication module for FastAPI with JWT, OAuth2, and user management

Project description

rodrigo0000-fastapi-core-auth

Authentication module for FastAPI with JWT, OAuth2, and user management.

Features

  • JWT token-based authentication
  • OAuth2 password flow
  • User registration and login
  • Password hashing with bcrypt
  • Token refresh functionality
  • User management repository

Installation

pip install rodrigo0000-fastapi-core-auth

Usage

from rodrigo0000_fastapi_core_auth import router, AuthRepository
from fastapi import FastAPI

app = FastAPI()
app.include_router(router, prefix="/api/v1/auth", tags=["auth"])

Components

  • AuthRepository: Database operations for user authentication
  • Schemas: Pydantic models for requests and responses
    • LoginRequest
    • RegisterRequest
    • UserResponse
    • AuthResponse
  • Router: FastAPI router with authentication endpoints

Requirements

  • Python >= 3.8
  • FastAPI >= 0.104.0
  • SQLAlchemy >= 2.0.0
  • Pydantic >= 2.0.0
  • python-jose[cryptography] >= 3.3.0
  • passlib[bcrypt] >= 1.7.4

License

MIT License

Author

R Firm - Professional SaaS Development

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

rodrigo0000_fastapi_core_auth-1.0.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file rodrigo0000_fastapi_core_auth-1.0.2.tar.gz.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_auth-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e663e8699ad5760cca297c1dbb98559dcfe6f501c4e780885d37f463ae78299d
MD5 ff7d07110905ca7972cc49053c8cd8d5
BLAKE2b-256 687a05c6471a8f6900d3d99266790304df93f83a88a7c48fa40f33c881370132

See more details on using hashes here.

File details

Details for the file rodrigo0000_fastapi_core_auth-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_auth-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b94f58a2eec3681f95ee63243ee4666ab60407f7f578f3c2c9a82a03f98a902
MD5 1b6fecfdfcf148d67d0a6d7be05c9cb2
BLAKE2b-256 7a4e3cec2bfc976584432c2e3e2d8880884f0f70575edfe456ad2058a7748f91

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