Hi everyone, I am using a Flask app with Okta for authentication. Runs on AWS with Gunicorn3 and reverse proxy (Nginx) Everything works GREAT with http but when I install a cert (LetEncrypt) the app still works but I get a 400 error when I login. The URL that is sent to dev-xxxxx.okta.com says the callback is ‘http’ not ‘https’.
What do I need to do to get flask oidc to work with https? the OIDC config is:
app = Flask(name)
app.config[“OIDC_CLIENT_SECRETS”] = “client_secrets.json”
app.config[“OIDC_COOKIE_SECURE”] = False
app.config[“OIDC_CALLBACK_ROUTE”] = “/oidc/callback”
app.config[“OIDC_SCOPES”] = [“openid”, “email”, “profile”]
app.config[‘SECRET_KEY’] = ‘super secet’
app.config[“OIDC_ID_TOKEN_COOKIE_NAME”] = “oidc_token”
oidc = OpenIDConnect(app)
okta_client = UsersClient(“https://dev-xxxxxx.okta.com”, “AUTH TOKEN”)
if name == ‘main’:
app.run(ssl_context=‘adhoc’)