# Sign-in widget registration only redirects to site correctly 50% of the time

**URL:** <https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646>\
**Category:** Questions\
**Created:** [March 14, 2023, 5:15pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646 "2023-03-14T17:15:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gstock](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gstock](https://devforum.okta.com/u/gstock)\
**Post date:** [March 14, 2023, 5:15pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646/1 "2023-03-14T17:15:25Z")

</div>

Hello,

We seem to be having an issue with the Okta sign-in widget where it seems to only work 50% of the time. Literally I sign up for an account, no token retrieval and sent back to the signin-page (account created however). Then I sign up for yet another account, token retrieval and sent to our site like expected. The accounts are correctly created everytime, but the token retrieval and subsequent redirect do not.

Here are our okta packages:  
“@okta/okta-auth-js”: “7.0.0”,  
“@okta/okta-react”: “6.7.0”,  
“@okta/okta-signin-widget”: “6.8.1”,

We are using the security and logincallback components to handle routes. This one has been a real headscratcher and curious if anyone has any insights/suggestions? Note: when I say 50% it seems to work then fail the next time and vice versa.

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [March 14, 2023, 8:37pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646/2 "2023-03-14T20:37:24Z")

</div>

How are you testing it? In the same browser each time or different browsers? Does it make a difference if you clear cache and cookies after each try?

---

<div class="post-metadata">

**Author:** ![gstock](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gstock](https://devforum.okta.com/u/gstock)\
**Post date:** [March 14, 2023, 9:42pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646/3 "2023-03-14T21:42:10Z")

</div>

Same browser each time(Chrome). Testing it by registering a new account via the form on our live site. Clearing cache/cookies does not seem to affect the behavior.

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [March 14, 2023, 10:54pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646/4 "2023-03-14T22:54:51Z")

</div>

Ok, so that’s eliminates the possibility of it being related to a session or cookie issue. If you open the browser dev tools → Network → check the Preserve Log option, then compare the network traffic for a successful vs failed attempt do you see anything that’s missing?

---

<div class="post-metadata">

**Author:** ![gstock](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gstock](https://devforum.okta.com/u/gstock)\
**Post date:** [March 15, 2023, 4:45pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646/5 "2023-03-15T16:45:37Z")

</div>

Yeah, specifically it seems that successful “register” and “authn” calls are made, but for whatever reason the “token” call is only made 50% of the time.

---

<div class="post-metadata">

**Author:** ![gstock](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gstock](https://devforum.okta.com/u/gstock)\
**Post date:** [March 15, 2023, 4:49pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646/6 "2023-03-15T16:49:41Z")

</div>

For further clarification, the accounts are successfully created every time. I can access the website via URL, I’m just not redirected.

---

<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 13, 2024, 11:45pm UTC](https://devforum.okta.com/t/sign-in-widget-registration-only-redirects-to-site-correctly-50-of-the-time/23646/7 "2024-02-13T23:45:06Z")

</div>

Closed on February 13, 2024, 11:45pm UTC


