def get(self):
        session.pop('uid', None)
        session.pop('access_token', None)
        session.pop('email', None)

        response_redirect = redirect(url_for(self.complete_url))

        # if the url contains ?return, go back to the referrer page
        if 'return' in request.args and request.referrer:
            is_same_host = (urlparse.urlparse(request.referrer).netloc ==
                urlparse.urlparse(request.host_url).netloc)
            if is_same_host:
                response_redirect = redirect(request.referrer)

        # remove refresh token and login email
        response = current_app.make_response(response_redirect)
        response.delete_cookie('refresh_token')
        response.delete_cookie('refresh_email')

        return response
dataset/ETHPy150Open dropbox/changes/changes/web/auth.py/LogoutView.get/original