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.1.tar.gz (2.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.1.tar.gz.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_auth-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4d8cbb8971c148b592cbf8ef1dba60067215f90b2aa81a6addf0ac6449c0860c
MD5 529a49b465de1383bf35290e21aff8ee
BLAKE2b-256 1a6605867cf14130500307ea90769c283ac8730c3c76f331d401e3de7b4e0c40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_auth-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6fba57b937b39f2e339fc55c532a91f6b90cafa7ec1379bcf2102d9df6bdf3a
MD5 8e96091f34f30ff91120f4bb64d0dd8d
BLAKE2b-256 1b9ea0ec0a4d005b557074fd72d8dd5b39d342d76a49101a7495a1b7f3125fb1

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