OAuth Client for the Login service, 'login-service-client-id', is not configured

environment: tutor, version 13.1.3; ubuntu 20.04
when submit email / password from

  1. https://learn.mydomain.com/login?next=%2F
    or from
  2. (studio) https://learn.mydomain.com/login?next=/oauth2/authorize%3Fclient_id%3Dcms-sso%26redirect_uri%3Dhttps%3A%2F%2Fstudio.learn.mydomain.com%2Fcomplete%2Fedx-oauth2%2F%3Fredirect_state%3DgdxZzLdUV34HRBjnDC1ohsRxMSk4o3B2%26state%3DgdxZzLdUV34HRBjnDC1ohsRxMSk4o3B2%26response_type%3Dcode%26scope%3Duser_id%2Bprofile%2Bemail

to login, I will get

We couldn’t sign you in. OAuth Client for the Login service, ‘login-service-client-id’, is not configured.
But when I change the URL to

  1. https://learn.mydomain.com or
  2. https://studio.learn.mydomain.com
    I found the login was successful
    Can anyone give me some direction to debug?
    Below is the log.
    Thanks a lot.
===tutor local logs --follow lms===
lms\_1 | 2022-03-22 11:07:32,218 INFO 6 \[tracking\] \[user None\] \[ip\] logger.py:41 - {"name": "/api/user/v1/account/login\_session/", "context": {"user\_id": null, "path": "/api/user/v1/account/login\_session/", "course\_id": "", "org\_id": "", "enterprise\_uuid": ""}, "username": "", "session": "a1589ef5153699775a17c8206644d7ba", "ip": "", "agent": "Mozilla/5.0 (X11; Linux x86\_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36", "host": "learn.mydomain.com", "referer": "https://learn.mydomain.com/login?next=%2F", "accept\_language": "en-US,en;q=0.9", "event": "{"GET": {}, "POST": {"email": \["username@domain.name"\], "password": "********"}}", "time": "2022-03-22T11:07:32.218039+00:00", "event\_type": "/api/user/v1/account/login\_session/", "event\_source": "server", "page": null}
lms\_1 | 2022-03-22 11:07:32,225 INFO 6 \[openedx.core.djangoapps.cors\_csrf.helpers\] \[user None\] \[ip\] helpers.py:64 - Origin 'https://learn.mydomain.com' was not in `CORS_ORIGIN_WHITELIST`; full referer was 'https://learn.mydomain.com/login?next=%2F' and requested host was 'learn.mydomain.com'; CORS\_ORIGIN\_ALLOW_ALL=False
lms_1 | 2022-03-22 11:07:32,452 INFO 6 \[audit\] \[user 5\] \[ip\] models.py:2725 - Login success - user.id: 5
lms\_1 | 2022-03-22 11:07:32,466 INFO 6 \[openedx\_events.tooling\] \[user 5\] \[ip\] tooling.py:160 - Responses of the Open edX Event <org.openedx.learning.auth.session.login.completed.v1>:
lms_1 | \[\]
lms_1 | 2022-03-22 11:07:32,481 ERROR 6 \[edx.student\] \[user 5\] \[ip\] login.py:600 - {'success': False, 'value': Markup('OAuth Client for the Login service, 'login-service-client-id', is not configured.')}
lms_1 | Traceback (most recent call last):
lms\_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user\_authn/cookies.py", line 350, in \_get\_login\_oauth\_client
lms\_1 | return Application.objects.get(client\_id=login\_client\_id)
lms\_1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager\_method
lms\_1 | return getattr(self.get\_queryset(), name)(\*args, \*\*kwargs)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
lms_1 | raise self.model.DoesNotExist(
lms\_1 | oauth2\_provider.models.Application.DoesNotExist: Application matching query does not exist.
lms_1 |
lms_1 | During handling of the above exception, another exception occurred:
lms_1 |
lms_1 | Traceback (most recent call last):
lms\_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user\_authn/views/login.py", line 592, in login_user
lms\_1 | response = set\_logged\_in\_cookies(request, response, possibly\_authenticated\_user)
lms\_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user\_authn/cookies.py", line 153, in set\_logged\_in_cookies
lms\_1 | \_create\_and\_set\_jwt\_cookies(response, request, cookie_settings, user=user)
lms\_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user\_authn/cookies.py", line 291, in \_create\_and\_set\_jwt_cookies
lms\_1 | jwt = \_create\_jwt(request, user, expires\_in)
lms\_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user\_authn/cookies.py", line 306, in \_create\_jwt
lms\_1 | oauth\_application = \_get\_login\_oauth\_client()
lms\_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user\_authn/cookies.py", line 352, in \_get\_login\_oauth\_client
lms_1 | raise AuthFailedError( # lint-amnesty, pylint: disable=raise-missing-from
lms\_1 | openedx.core.djangoapps.user\_authn.exceptions.AuthFailedError
lms\_1 | \[pid: 6|app: 0|req: 93/323\] () {66 vars in 1543 bytes} \[Tue Mar 22 11:07:32 2022\] POST /api/user/v1/account/login\_session/ => generated 158 bytes in 297 msecs (HTTP/1.1 400) 10 headers in 915 bytes (1 switches on core 0)

Hi @focus!

We’ve not seen that issue on Tutor versions 12.0.2 or 13.1.4 when logging in with a username and password when OAuth2 is enabled. I publish our OAuth2 setting in post Social login configuration for edx as plugin in tutor a while back. Perhaps you can view our config settings to see if anything is different that might trigger the login-service-client-id error that you are seeing.

@focus got the same issues. I recently installed in was. Does not work email login.

In my case, it always happened after I delete 3 default users: cms, …

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.