Fix: CORS issues in third-party auth disconnect by adding JSON endpoint (#37100)

Add a json auth endpoint where previously there was only an HTML redirect version. This will make it easier to work with MFEs.

---------

Co-authored-by: Feanil Patel <feanil@axim.org>
This commit is contained in:
wgu-jesse-stewart
2025-09-15 10:07:49 -04:00
committed by GitHub
parent c35d3267b6
commit 254dd2f689
5 changed files with 124 additions and 5 deletions

View File

@@ -419,7 +419,7 @@ class TestThirdPartyAuthUserStatusView(ThirdPartyAuthTestMixin, APITestCase):
assert (response.data ==
[{
'accepts_logins': True, 'name': 'Google',
'disconnect_url': '/auth/disconnect/google-oauth2/?',
'disconnect_url': '/auth/disconnect_json/google-oauth2/?',
'connect_url': f'/auth/login/google-oauth2/?auth_entry=account_settings&next={next_url}',
'connected': False, 'id': 'oa2-google-oauth2'
}])