# Flask-Oidc - Redirect\_URI error

**URL:** <https://devforum.okta.com/t/flask-oidc-redirect-uri-error/24474>\
**Category:** OAuth/OIDC\
**Tags:** python\
**Created:** [June 6, 2023, 6:34pm UTC](https://devforum.okta.com/t/flask-oidc-redirect-uri-error/24474 "2023-06-06T18:34:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![caronoff99](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@caronoff99](https://devforum.okta.com/u/caronoff99)\
**Post date:** [June 6, 2023, 6:34pm UTC](https://devforum.okta.com/t/flask-oidc-redirect-uri-error/24474/1 "2023-06-06T18:34:30Z")

</div>

Has anyone been able to authenticate properly? The login attemps to redirect and the correct path is registered in Okta for URI

I launch on local host a protected path, expecting to be redirected to the login page.

I get this error:

`Your request resulted in an error. The ‘redirect_uri’ parameter must be a Login redirect URI in the client app settings:`

I am fairly certain this is the same problem reported here but unanswered.  
The tutorials have not been updated and Flask-OIDC is not really maintained anymore. Is there another way to use Okta with Python?

> [@OpenID Connect - redirect\_uri http vs https](https://devforum.okta.com/t/openid-connect-redirect-uri-http-vs-https/12693):
>
> Hello, I have successfully deployed a simple python flask app that uses Flask-OIDC to authenticate to our orgs okta server. Everything works perfectly when the redirect\_uri is http like this: [http://stizzle2.azurewebsites.net/authorization-code/callback](http://stizzle2.azurewebsites.net/authorization-code/callback) If I try and switch it to https like this: [https://stizzle2.azurewebsites.net/authorization-code/callback](https://stizzle2.azurewebsites.net/authorization-code/callback) it does not work and I get a 400 response: Description: The ‘redirect\_uri’ parameter must be a Login redirect URI in the client app …

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [June 7, 2023, 7:42am UTC](https://devforum.okta.com/t/flask-oidc-redirect-uri-error/24474/2 "2023-06-07T07:42:15Z")

</div>

Hello,

This error means that whatever is specified as the redirext\_uri is not registered as a login redirect URI in the Okta OIDC application.

Can you verify by testing the application and open the dev console window. For the `/authorize` call check the request parameters sent and make sure the expected `redirect_uri` is being sent and the exact value is present in your Okta Orgs OIDC application valid login redirect URIs.

Thank You,

---

<div class="post-metadata">

**Author:** ![caronoff99](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@caronoff99](https://devforum.okta.com/u/caronoff99)\
**Post date:** [June 7, 2023, 2:52pm UTC](https://devforum.okta.com/t/flask-oidc-redirect-uri-error/24474/3 "2023-06-07T14:52:59Z")

</div>

The redirect parameter It is in the URL query 🙂  
Your request resulted in an error. The ‘redirect\_uri’ parameter must be a Login redirect URI in the client app settings: [okta-dev-16525609 - Sign In](https://dev-16525609-admin.okta.com/admin/app/oidc_client/instance/0oa9tq8801tfdQWn95d7#tab-general)

[Go to Homepage](https://dev-16525609.okta.com/)

T

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 15, 2024, 5:33pm UTC](https://devforum.okta.com/t/flask-oidc-redirect-uri-error/24474/4 "2024-02-15T17:33:37Z")

</div>

Closed on February 15, 2024, 5:33pm UTC


