diff --git a/flask_oauthlib/provider/oauth1.py b/flask_oauthlib/provider/oauth1.py index 1d373a8a..cb8e81cb 100644 --- a/flask_oauthlib/provider/oauth1.py +++ b/flask_oauthlib/provider/oauth1.py @@ -725,12 +725,12 @@ def validate_timestamp_and_nonce(self, client_key, timestamp, nonce, access_token=None): """Validate the timestamp and nonce is used or not.""" log.debug('Validate timestamp and nonce %r', client_key) - nonce = self._noncegetter( + nonce_exists = self._noncegetter( client_key=client_key, timestamp=timestamp, nonce=nonce, request_token=request_token, access_token=access_token ) - if nonce: + if nonce_exists: return False self._noncesetter( client_key=client_key, timestamp=timestamp,