The 'redirect_uri' parameter must be an absolute URI that is whitelisted in the client app settings


#1

Hello trying this tutorial

And I’m getting what seems to be a typical problem with people starting out, but none of the solutions i’m seeing are working for me. Hopefully someone can help see where I am going wrong.

{
“web”: {
“client_id”: “1…2”,
“client_secret”: “1…2”,
“auth_uri”: “h://dev-1…2.oktapreview.com/oauth2/default/v1/authorize”,
“token_uri”: “h://dev-1…2.oktapreview.com/oauth2/default/v1/token”,
“issuer”: “h://dev-1…2.oktapreview.com/oauth2/default”,
“userinfo_uri”: “h://dev-1…2.oktapreview.com/oauth2/default/userinfo”,
“redirect_uris”: [
“h://localhost:5000/oidc/callback”
]
}
}

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”] = “1…2”
app.config[“OIDC_ID_TOKEN_COOKIE_NAME”] = “oidc_token”
oidc = OpenIDConnect(app)
okta_client = UsersClient(“h://1…2.oktapreview.com”, “1…2”)

in my app settings in Okta my “Login redirect URIs” is set to “redirect_uris” above in my client_secrets.

Not sure what else to try.

Thanks in advance


#2

Hello,

I have just found this, not sure if it is gonna solve your problem (and mine) but I will share my results.

Regards,

Manu


#3

I am getting this error too and my code is just have you @JLC have stated above. I also verified that my redirect_uris link in the client_secrets.json file match the application ‘Login redirect URIs’ from the ‘General’ tab->general settings->Login section. Feel like I am close as my logo shows up in the header of the bad request page, but not working still.