I am making a Facebook login feature in my FastAPI/Starlette app, and have a problem with it.
I see starlette provides some documentation on how to make authentication like:
https://www.starlette.io/authentication/
, but with SSO, I would expect to login a user in a redirect fallback endpoint's view. It seems however, that Starlette only wants me to validate/login user in the middleware's backend, and not directly in the view like you do for example in Django.
What would be the solution to that?
In Django I could do just login(user, request). And here Starlette seems to force me to do it in the Middleware.