INNER CODE UNIT · Python
unset_access_cookies
IndominusByte/fastapi-jwt-auth · fastapi_jwt_auth/auth_jwt.py:427
def unset_access_cookies(self,response: Optional[Response] = None) -> None:
"""
Remove access token and access CSRF double submit from the response cookies
:param response: The FastAPI response object to delete the access cookies in.
"""
if not self.jwt_in_cookies:
raise RuntimeWarning(
"unset_access_cookies() called without 'authjwt_token_location' configured to use cookies"
)
if response and not isinstance(response,Response):
raise TypeError("The response must be an object response FastAPI")
response = response or self._response
response.delete_cookie(
self._access_cookie_key,