IndominusByte / fastapi-jwt-auth

FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
http://indominusbyte.github.io/fastapi-jwt-auth/
MIT License
627 stars 143 forks source link

No Swagger UI Operations Permitted #73

Open AmmarAhmadKhan opened 2 years ago

AmmarAhmadKhan commented 2 years ago

I am not finding any way for accessing authorization header through fastapi_jwt_auth library, like we have the Swagger UI Authorization available for OAuth2PasswordBearer in which we can give tokenUrl and Swagger automatically adds Authorization header in successive requests

krishnardt commented 2 years ago

try removing domain, while setting up cookie. It worked for me.

`response.set_cookie( key=COOKIE_AUTHORIZATION_NAME, value=f"Bearer {access_token}",

domain=COOKIE_DOMAIN,

    httponly=True,
    max_age=60,          # 3 hours
    expires=60, 
    #samesite="none", secure=True         # 3 hours
    # samesite="Lax", secure=False
)

`