# How to force an OAuth error with Okta Sign In Widget

**URL:** <https://devforum.okta.com/t/how-to-force-an-oauth-error-with-okta-sign-in-widget/27916>\
**Category:** Questions\
**Tags:** widget, reactjs\
**Created:** [April 25, 2024, 3:14pm UTC](https://devforum.okta.com/t/how-to-force-an-oauth-error-with-okta-sign-in-widget/27916 "2024-04-25T15:14:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmd](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@pmd](https://devforum.okta.com/u/pmd)\
**Post date:** [April 25, 2024, 3:14pm UTC](https://devforum.okta.com/t/how-to-force-an-oauth-error-with-okta-sign-in-widget/27916/1 "2024-04-25T15:14:26Z")

</div>

I’m using the Okta Sign In Widget and I was testing my custom LoginCallback with a failed challenge. It was failing (as expected) for a while when I had an invalid configuration (useClassicEngine set incorrectly) but now it won’t fail anymore.

Is there an way to force that initial challenge to fail so I can continue testing this failure path? I tried setting all of the fields to invalid values but I’m not able to generate an OAuth error again. Previously I was getting an invalid service provider.

---

<div class="post-metadata">

**Author:** ![nicole](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@nicole](https://devforum.okta.com/u/nicole)\
**Post date:** [April 30, 2024, 1:36pm UTC](https://devforum.okta.com/t/how-to-force-an-oauth-error-with-okta-sign-in-widget/27916/2 "2024-04-30T13:36:44Z")

</div>

Can you provide some context on your use-case? Are you unit testing the sign-in widget?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [June 2, 2024, 9:47am UTC](https://devforum.okta.com/t/how-to-force-an-oauth-error-with-okta-sign-in-widget/27916/4 "2024-06-02T09:47:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
