# How to mock Okta Authentication for playwright tests

**URL:** <https://devforum.okta.com/t/how-to-mock-okta-authentication-for-playwright-tests/30614>\
**Category:** Questions\
**Tags:** react\
**Created:** [September 18, 2024, 1:33pm UTC](https://devforum.okta.com/t/how-to-mock-okta-authentication-for-playwright-tests/30614 "2024-09-18T13:33:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naltun](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@naltun](https://devforum.okta.com/u/naltun)\
**Post date:** [September 18, 2024, 1:33pm UTC](https://devforum.okta.com/t/how-to-mock-okta-authentication-for-playwright-tests/30614/1 "2024-09-18T13:33:22Z")

</div>

Hi,

Currently, we are using okta react js framework in our react app. We are trying to write e2e test for our applicationg using playwright. However, we are having difficulties with mocking okta authentication.  
What would be the best way to mock okta auth so that we can write and run our end-to-end tests for our app?

---

<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:** [October 18, 2024, 1:34pm UTC](https://devforum.okta.com/t/how-to-mock-okta-authentication-for-playwright-tests/30614/2 "2024-10-18T13:34:09Z")

</div>

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