Insights redirecting to http://127.0.0.1:8000/oauth2/authorize

Hi All,

Can anyone help me with this please? I have done the following…
I have done similar configurations on Ficus 4 before and it worked but seems to not work with present version I downloaded without any tags.

It redirects to http://127.0.0.1:8000/oauth2/authorize?scope=user_id+profile+email&client_id=insights-sso-key&state=4kA4aHMTQwfA3zjArka0ihXitjIEuKoM&response_type=code&redirect_uri=https%3A%2F%2Finsights.domain.com%3A18110%2Fcomplete%2Fedx-oauth2%2F%3Fredirect_state%3D4kA4aHMTQwfA3zjArka0ihXitjIEuKoM

On LMS Machine
In Django Admin
In Oauth2 --> Clients Select the admin user and Name
Add https://insights.domain.com:18110 in URL
Add https://insights.domain.com:18110/complete/edx-oidc/ in Redirect URL
Client Type Confidential(Web Applications)
Note the Client id and Client Secret to add below.

sudo vi /edx/app/edxapp/lms.env.json
“FEATURES”: {
“ENABLE_OAUTH2_PROVIDER”: true,
},

“JWT_EXPIRATION”: 30,
“JWT_ISSUER”: “https://www.domain.com/oauth2”,
“OAUTH_ENFORCE_SECURE”: true,
“OAUTH_OIDC_ISSUER”: “https://www.domain.com/oauth2”,
“ANALYTICS_DASHBOARD_URL”: “https://insights.domain.com:18110”,
Restarting Services

Analytics Machine

sudo vi /edx/etc/insights.yml

SOCIAL_AUTH_EDX_OIDC_URL_ROOT: https://www.domain.com/oauth2
SOCIAL_AUTH_EDX_OIDC_KEY: xxxxxxxxxxxxxxxxxxxxxxxx
SOCIAL_AUTH_EDX_OIDC_SECRET: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SOCIAL_AUTH_REDIRECT_IS_HTTPS: true
SOCIAL_AUTH_EDX_OIDC_LOGOUT_URL: https://www.domain.com/logout

Reboot server.

Do I need to do any changes anywhere else? Any documentation that can help?

Regards,
Neville