Hello!
I’m having troubles with Django OAuth Toolkit superset’s configuration in Aspects. I am using tutor contrib aspects 2.3.1 and tutor 19.0.5, and building the project in Docker, with tutor local …
If I build the application from scratch, I cannot access superset due to a Mismatching redirect URI error:
While my intial configuration in Django OAuth Toolkit for superset-sso application shows a redirect-uri like this: https://superset-uamx-pre.uam.es/oauth-authorized/openedxsso
, both links from inside LMS (the link in Reports) and outside LMS (the URL https://superset-uamx-pre.uam.es/) when trying to log into superset it generates a URL like this: https://uamx-pre.uam.es/oauth2/authorize/?response_type=code&client_id=XXXXXXXX&redirect_uri=http%3A%2F%2Fsuperset-uamx-pre.uam.es%3A443%2Foauth-authorized%2Fopenedxsso&scope=profile+email+user_id&state=XXXXXXXX
You can see that the redirect_uri param (redirect_uri=http%3A%2F%2Fsuperset-uamx-pre.uam.es%3A443%2Foauth-authorized) includes the port (443) that is the Caddy’s header_up X-Forwarded-Port 443
parameter.
So I tried to change the supserset-sso Django OAuth Toolkit configuration to match the redirect_uri param (http://superset-uamx-pre.uam.es:443/oauth-authorized/openedxsso), using http instead of https protocol and adding the 443 port. This worked for the direct access to Superset (https://superset-uamx-pre.uam.es) but NOT for the access within the LMS (in the Reports tab)
I can see the Reports in the Reports tab perfectly, so I don’t know what can be happening…
Thank you very much for your support
Bests!