INNER CODE UNIT · Python
unset_refresh_cookies
IndominusByte/fastapi-jwt-auth · fastapi_jwt_auth/auth_jwt.py:456
def unset_refresh_cookies(self,response: Optional[Response] = None) -> None:
"""
Remove refresh token and refresh CSRF double submit from the response cookies
:param response: The FastAPI response object to delete the refresh cookies in.
"""
if not self.jwt_in_cookies:
raise RuntimeWarning(
"unset_refresh_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._refresh_cookie_key,