Using FreeAuthApp Extension

The FreeAuthApp object that will wire the db client and the authentication dependencies. You can initial your FreeAuthApp instance by passing an FastAPI application instance like this:

from fastapi import FastAPI
from freeauth.ext.fastapi_ext import FreeAuthApp

auth_app = FreeAuthApp()

def get_app():
  app = FastAPI()
  auth_app.init_app(app)
  return app

asgi_app = get_app()