From 50a091a7b0dd408472f9ecf27c4f6d0a52ecc161 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 19 Jan 2026 17:32:09 +0530 Subject: [PATCH] fix: allow social login endpoints --- lms/auth.py | 11 ++++++++++- lms/test_auth.py | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lms/auth.py b/lms/auth.py index 3e756fad..7ad9354b 100644 --- a/lms/auth.py +++ b/lms/auth.py @@ -12,6 +12,15 @@ ALLOWED_PATHS = [ "/api/method/frappe.integrations.oauth2.authorize", "/api/method/frappe.integrations.oauth2.approve", "/api/method/frappe.integrations.oauth2.get_token", + "/api/method/frappe.www.login.login_via_google", + "/api/method/frappe.www.login.login_via_github", + "/api/method/frappe.www.login.login_via_facebook", + "/api/method/frappe.www.login.login_via_frappe", + "/api/method/frappe.www.login.login_via_office365", + "/api/method/frappe.www.login.login_via_salesforce", + "/api/method/frappe.www.login.login_via_fairlogin", + "/api/method/frappe.www.login.login_via_keycloak", + "/api/method/frappe.www.login.custom", "/api/method/frappe.integrations.oauth2.openid_profile", "/api/method/frappe.website.doctype.web_page_view.web_page_view.make_view_log", "/api/method/upload_file", @@ -48,7 +57,7 @@ def authenticate(): if not path.startswith("/api/"): return - print("path", path) + if path.startswith("/lms") or path.startswith("/api/method/lms."): return diff --git a/lms/test_auth.py b/lms/test_auth.py index 42569cbd..5981d60f 100644 --- a/lms/test_auth.py +++ b/lms/test_auth.py @@ -1,8 +1,6 @@ import frappe -from frappe.tests import UnitTestCase from frappe.tests.test_api import FrappeAPITestCase -from lms.auth import authenticate from lms.lms.test_utils import TestUtils