This is a bit hacky way right now but necessary to integrate a marimo app because the user information gets moved into the marimo.app_meta().request object.
class CopyUserMiddleware(BaseHTTPMiddleware):
async def dispatch(self, request: Request, call_next):
request.scope["user"] = request.scope["session"]["bfabric_session"]
response = await call_next(request)
return response
app.add_middleware(CopyUserMiddleware)
I will need to read up a bit on the API how to best handle this.
This is a bit hacky way right now but necessary to integrate a marimo app because the user information gets moved into the
marimo.app_meta().requestobject.I will need to read up a bit on the API how to best handle this.