MushroomMaula / fastapi_login

FastAPI-Login tries to provide similar functionality as Flask-Login does.
https://pypi.org/project/fastapi-login
MIT License
639 stars 58 forks source link

Cookie for request.state.user #71

Closed LovelessCodes closed 2 years ago

LovelessCodes commented 2 years ago

When you create an access token and set it as a cookie - can you somehow call the user like how it is in the documentation?

    user = request.state.user
    if user is None:
        raise HTTPException(401)

or is that simply not possible when utilizing cookies?