# Okta Widget showSignInAndRedirect not allowing for deep linking

**URL:** <https://devforum.okta.com/t/okta-widget-showsigninandredirect-not-allowing-for-deep-linking/12429>\
**Category:** Questions\
**Created:** [January 8, 2021, 5:55pm UTC](https://devforum.okta.com/t/okta-widget-showsigninandredirect-not-allowing-for-deep-linking/12429 "2021-01-08T17:55:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchabot86](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jchabot86](https://devforum.okta.com/u/jchabot86)\
**Post date:** [January 8, 2021, 5:55pm UTC](https://devforum.okta.com/t/okta-widget-showsigninandredirect-not-allowing-for-deep-linking/12429/1 "2021-01-08T17:55:58Z")

</div>

using widget.showSignInAndRedirect().catch(handleError); it always brings me to /implicit/callback and then to the base Uri. Why isn’t it redirecting me to the deep link (protected route) I initially tried to go to while I was unauthenticated?  
Steps:  
Go to protected route  
Get redirected to login page  
Login  
Get redirected to /implicit/callback  
Get redirected to base url (window origin) instead of the protected route I originally attempted

---

<div class="post-metadata">

**Author:** ![sigama](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sigama/32/5811_2.png) [@sigama](https://devforum.okta.com/u/sigama)\
**Post date:** [January 11, 2021, 7:51pm UTC](https://devforum.okta.com/t/okta-widget-showsigninandredirect-not-allowing-for-deep-linking/12429/2 "2021-01-11T19:51:41Z")

</div>

Hi @jchabot86! Can you confirm which browser and SDK you are using?

---

<div class="post-metadata">

**Author:** ![jchabot86](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jchabot86](https://devforum.okta.com/u/jchabot86)\
**Post date:** [January 11, 2021, 8:25pm UTC](https://devforum.okta.com/t/okta-widget-showsigninandredirect-not-allowing-for-deep-linking/12429/3 "2021-01-11T20:25:57Z")

</div>

In my case, the basename is /customers. It seems to be trying to bring me to /customers/customers/policies instead of /customers/policies.  
Looks like I’m hitting this same issue: [https://github.com/okta/okta-react/issues/60](https://github.com/okta/okta-react/issues/60) - but there hasn’t been any activity on that issue in a month.

I added this to my okta config which seems to be a workaround:

```
  restoreOriginalUri: (_: any, originalUri: string) => {
    window.location.replace(originalUri);
  }

```

Chrome Version 87.0.4280.88 (Official Build) (x86\_64)

okta-auth-js 4.5.1  
okta-react 4.0.0  
okta-signin-widget 5.2.1

---

<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:** [January 14, 2021, 11:38pm UTC](https://devforum.okta.com/t/okta-widget-showsigninandredirect-not-allowing-for-deep-linking/12429/4 "2021-01-14T23:38:06Z")

</div>

@jchabot86 We had a JIRA OKTA-353934 created for the GH issue [https://github.com/okta/okta-react/issues/60](https://github.com/okta/okta-react/issues/60). There will be update or improvement soon.

---

<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:** [January 26, 2024, 5:57pm UTC](https://devforum.okta.com/t/okta-widget-showsigninandredirect-not-allowing-for-deep-linking/12429/5 "2024-01-26T17:57:31Z")

</div>


