diff --git a/frappe/auth.py b/frappe/auth.py index 27aff63371..648f72f8e7 100644 --- a/frappe/auth.py +++ b/frappe/auth.py @@ -665,6 +665,8 @@ def validate_api_key_secret(api_key, api_secret, frappe_authorization_source=Non if frappe.local.login_manager.user in ("", "Guest"): frappe.set_user(user) frappe.local.form_dict = form_dict + else: + raise frappe.AuthenticationError def validate_auth_via_hooks():