# Why doesn't my redirect\_uri work?

**URL:** <https://devforum.okta.com/t/why-doesnt-my-redirect-uri-work/12989>\
**Category:** Questions\
**Created:** [February 18, 2021, 5:03pm UTC](https://devforum.okta.com/t/why-doesnt-my-redirect-uri-work/12989 "2021-02-18T17:03:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![corysimmons](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/corysimmons/32/1842_2.png) [@corysimmons](https://devforum.okta.com/u/corysimmons)\
**Post date:** [February 18, 2021, 5:03pm UTC](https://devforum.okta.com/t/why-doesnt-my-redirect-uri-work/12989/1 "2021-02-18T17:03:15Z")

</div>

I’m trying to enable and configure Self Service Registration and redirect to my app’s home page.

I have a Single Page Application with just “Authorization Code” and “Require Consent” checked.  
The URL has been added to “Login redirect URIs” as `https://foo.netlify.app/`  
And “Logout redirect URIs” as `https://foo.netlify.app`  
My homepage’s URL is not in “Login initiated by” at all.  
“Login initiated by” is `App Only`  
`https://foo.netlify.app/` is added as a “Trusted Origin” with “Type: CORS”

When I edit the “Default redirect” field on the Self Service Registration page to `https://foo.netlify.app/` or `https://foo.netlify.app` and try to save, I get `https://foo.netlify.app/ is not a valid redirect URI`

What am I doing wrong? Does anything stick out?

Thank you in advance to anyone who helps with this. “Not a valid redirect URI” is a common problem of mine when working with Okta.

---

<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 18, 2021, 9:33pm UTC](https://devforum.okta.com/t/why-doesnt-my-redirect-uri-work/12989/2 "2021-02-18T21:33:10Z")

</div>

Can your ensure that `https://foo.netlify.app` is added as a Trusted Origin for Redirects as well? This needs to be configured if you want users to be _redirected_ to this application after they register.

---

<div class="post-metadata">

**Author:** ![corysimmons](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/corysimmons/32/1842_2.png) [@corysimmons](https://devforum.okta.com/u/corysimmons)\
**Post date:** [February 18, 2021, 10:43pm UTC](https://devforum.okta.com/t/why-doesnt-my-redirect-uri-work/12989/3 "2021-02-18T22:43:54Z")

</div>

That was exactly the problem! Thank you so much Andrea! 😃

---

<div class="post-metadata">

**Author:** ![Lijia](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/lijia/32/2295_2.png) [@Lijia](https://devforum.okta.com/u/Lijia)\
**Post date:** [February 18, 2021, 10:45pm UTC](https://devforum.okta.com/t/why-doesnt-my-redirect-uri-work/12989/4 "2021-02-18T22:45:13Z")

</div>

Closed on February 18, 2021, 10:45pm UTC


