From 00a634501258556ba23eda53602ab619e4c34044 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 24 Feb 2025 14:05:43 +0100 Subject: [PATCH] fix: Run on_session_creation on OAuth logins Closes https://github.com/frappe/frappe/issues/31409 --- frappe/utils/oauth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/utils/oauth.py b/frappe/utils/oauth.py index e1f1b4bb2a..6f62d72dc5 100644 --- a/frappe/utils/oauth.py +++ b/frappe/utils/oauth.py @@ -204,8 +204,8 @@ def login_oauth_user( http_status_code=403, ) - frappe.local.login_manager.user = user - frappe.local.login_manager.post_login() + frappe.local.login_manager.login_as(user) + frappe.local.login_manager.run_trigger("on_session_creation") # because of a GET request! frappe.db.commit()