Superset redirect_uri not correctly set

Description

The redirect URI in the oauth process isn't working on superset.uat.openlmis.org. The oAuth process posts to the OpenLMIS auth server and that POST includes an automatically generated redirect_uri=http%3A%2F%2Fsuperset-service%2Foauth-authorized%2Fopenlmis The name that's posted is the name of the docker container inside consult which is superset-server. We need to make it point to the environment variable that's set in the reporting folder (SUPERSET_DOMAIN_NAME). This will make it so that it's properly returned.

Current Status:
Step 1: go to the login page


Step 2: Click the login button and click Sign In
Step 3: Enter the username and password admin|password
Step 4: view the redirect_uri in the URL:
https://uat.openlmis.org/api/oauth/authorize?response_type=code&client_id=superset&redirect_uri=http%3A%2F%2Fsuperset-service%2Foauth-authorized%2Fopenlmis&scope=read+write

It should be:
https://uat.openlmis.org/api/oauth/authorize?response_type=code&client_id=superset&redirect_uri=https%3A%2F%2Fsuperset.uat.openlmis.org%2Foauth-authorized%2Fopenlmis&scope=read+write

We don't get this problem on localhost. The redirect_uri on localhost is localhost:8088.

The redirect_uri is set by flask-appBuilder using the url_for callback https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/security/views.py#L510

Environment

None

Status

Assignee

Craig Appl

Reporter

Jason Rogena

Labels

Story Points

2

Epic Link

Sprint

None

Fix versions

Affects versions

3.5

Priority

Major
Configure