- Added OAuth2 endpoints for Google and GitHub authentication. - Created OAuth service to handle provider interactions and user info retrieval. - Implemented user OAuth repository for managing user OAuth links in the database. - Updated auth service to support linking existing users and creating new users via OAuth. - Added CORS middleware to allow frontend access. - Created tests for OAuth endpoints and service functionality. - Introduced environment configuration for OAuth client IDs and secrets. - Added logging for OAuth operations and error handling.
14 lines
400 B
Python
14 lines
400 B
Python
"""API v1 package."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from app.api.v1 import auth, main, oauth
|
|
|
|
# V1 API router with v1 prefix
|
|
api_router = APIRouter(prefix="/v1")
|
|
|
|
# Include all route modules
|
|
api_router.include_router(main.router, tags=["main"])
|
|
api_router.include_router(auth.router, prefix="/auth", tags=["authentication"])
|
|
api_router.include_router(oauth.router, prefix="/oauth", tags=["oauth"])
|