Exemple #1
0
async def logout():
    response = JSONResponse({"logout_success": True})
    response.delete_cookie(key=COOKIE_NAME)
    return response
async def logout(logout_model: LogoutModel):
    crud.authentication.revoke_refresh_tokens(logout_model.username)

    response = JSONResponse(content='Logged out successfully')
    response.delete_cookie('pt_refreshtoken')
    return response