Mismatching redirect URI..while logging into Studio

I am getting an error message while logging into studio.
installed openedx using tutor (nutmeg). Using indio theme
Caddy is running on port 81,
ENABLE_HTTPS: true
ENABLE_WEB_PROXY: false

I did make changes in in url ie, changed http to https in ‘Home › Django OAuth Toolkit › Applications › cms-sso-dev’ as mentioned ‘Error: invalid_request Mismatching redirect URI - #2 by chintan’ but did’t work.

1 Like

Hello,

If you are running it in local, then there is no need of https, if you are running on kubernetes then what Lawerence did there with plugin that can be followed.

If there is other scenario can you please specify few more details ?

Hi,i m Running it in production only…all other urls,lms cms preview,apps.etc are working…This error message comes up straight when i click on login button on stuidio.mywebsite.com when i am already logged in lms in the browser. and also when i try to aceess the studio straight from the course contents also this error comes up

This problem arises when I run tutor behind the web proxy(mine is Nginx)

Since you are running it behind a proxy, check that the domain names and ports are correctly set in config.yml.

The mismatch error usually happens when the redirect_url for the cms-sso application is configured incorrectly.
Take a look here: https://{LMS}/admin/oauth2_provider/application/

It should be set to the public URL.

2 Likes

I can see that your domains are not matching with LMS being mywebsite.ai and CMS being studio.tedtex.kba.ai. You should recheck whether that they are supposed to be configured like that.

@uetuluk i, I reinstalled everything from scratch and its working good now…Thanks

What you said is true, However, I cant correct this by simply changing config.yml and then update by uswgi.
Issue fixed only after heading to https://{LMS}/admin/oauth2_provider/application/ and correct the direct uris to the right domains.

Alternatively, reinstalling the entire tutor fix it too.

The root cause was because I attempted to change the domain through modifying config.yml only after tutor was already setup By right i should define the domains in configs.yml before running tutor dev quickstart,

You can just run tutor local init or tutor dev init again after changing the domains since creating the cms_sso is part of the init process.

Don’t forget to do tutor config save as well.

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