def login_cookies(): # Create the tokens we will be sending back to the user access_token = create_access_token(identity='test') refresh_token = create_refresh_token(identity='test') # Set the JWTs and the CSRF double submit protection cookies in this response resp = jsonify({'login': True}) set_access_cookies(resp, access_token) set_refresh_cookies(resp, refresh_token) return resp, 200
def bad_refresh(): refresh_token = create_refresh_token('test') resp = jsonify({'login': True}) set_refresh_cookies(resp, refresh_token) return resp, 200