Server error wher trying to call ecommerce dashboard (Authentication failed)

Hi,

I have imstalled lms and studio on mydomain.com so I can reach them on

lms.mydomain.com
studio.mydomain.com

they both use https protocol and all http requests are redirected to https.

Now configured enabled the ecommerce so so it could be reached also via https under

ecommerce.mydomain.com

I followed the steps from this documentation with slight modifications, also there are already applications configured under https://lms.mydomain.com/admin/oauth2_provider/application/ .

I only changed the redirect uri to https://ecommerce.mydomain.com/complete/edx-oauth2/

Also I registered the site with:

python manage.py create_or_update_site
–site-id=1
–site-domain=ecommerce.mydomain.com
–partner-code=edX
–partner-name=‘Open edX’
–lms-url-root=https://lms.mydomain.com
–payment-processors=paypal
–sso-client-id=ecommerce-sso-key
–sso-client-secret=ecommerce-sso-secret
–backend-service-client-id=ecommerce-backend-service-key
–backend-service-client-secret=ecommerce-backend-service-secret
--from-email=billing@mydomain.com \

and adapted the value within /edx/etc/ecommerce.yml accordingly.

If I call the URL I get an server error and within the logs:

social_core.exceptions.AuthFailed: Authentication failed: HTTPSConnectionPool(host=‘lms.mydomain.com’, port=443): Max retries exceeded with url: /oauth2/access_token (Caused by SSLError(SSLCertVerificationError(“hostname ‘lms.edu-akademie.de’ doesn’t match ‘ecommerce.mydomain.com’”)))

What am I doing wrong.

Hi there,

the error was due to some kind of misconfiguration, though after this I got the error message:

File “/edx/app/ecommerce/venvs/ecommerce/lib/python3.8/site-packages/social_core/backends/oauth.py”, line 90, in validate_state
raise AuthStateMissing(self, ‘state’)
social_core.exceptions.AuthStateMissing: Session value state missing.

It turns out, that this has to do with the value for SESSION_COOKIE_SAMESITE . If you use another domain for your ecommerce site then the cookies does not seem to be set causing the outh verification to fail.

I have to experiment more to get this to work completely. Current solution is to use the same domain as the lms and use another port 18130 .

Regards
Matthias