diff --git a/src/backend/InvenTree/InvenTree/auth_overrides.py b/src/backend/InvenTree/InvenTree/auth_overrides.py index bf590d0500..fe8a3e072f 100644 --- a/src/backend/InvenTree/InvenTree/auth_overrides.py +++ b/src/backend/InvenTree/InvenTree/auth_overrides.py @@ -216,9 +216,10 @@ class CustomSocialAccountAdapter(RegistrationMixin, DefaultSocialAccountAdapter) return False def authentication_error( - self, request, provider_id, error=None, exception=None, extra_context=None + self, request, provider, error=None, exception=None, extra_context=None ): """Callback method for authentication errors.""" + provider_id = getattr(provider, 'id', provider) if not error: error = request.GET.get('error', None) diff --git a/src/backend/InvenTree/InvenTree/settings.py b/src/backend/InvenTree/InvenTree/settings.py index 4f39bf4f43..073a83a242 100644 --- a/src/backend/InvenTree/InvenTree/settings.py +++ b/src/backend/InvenTree/InvenTree/settings.py @@ -842,7 +842,9 @@ if DEBUG: 'http://localhost', 'http://*.localhost', 'http://*localhost:8000', + 'http://localhost:4173', 'http://*localhost:4173', + 'http://localhost:5173', 'http://*localhost:5173', ]: if origin not in CSRF_TRUSTED_ORIGINS: diff --git a/src/backend/InvenTree/InvenTree/test_auth.py b/src/backend/InvenTree/InvenTree/test_auth.py index 5c50b38e01..162c5f1a0f 100644 --- a/src/backend/InvenTree/InvenTree/test_auth.py +++ b/src/backend/InvenTree/InvenTree/test_auth.py @@ -178,6 +178,8 @@ class TestSocialAccountAdapter(TransactionTestCase): self.adapter.authentication_error( request, 'mock', error='denied', exception='User cancelled' ) + # new form + self.adapter.authentication_error(request, {'id': 'mock'}) class EmailSettingsContext: