# Okta Cypress Integration

**URL:** <https://devforum.okta.com/t/okta-cypress-integration/14714>\
**Category:** Questions\
**Created:** [June 14, 2021, 2:54pm UTC](https://devforum.okta.com/t/okta-cypress-integration/14714 "2021-06-14T14:54:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scarter](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@scarter](https://devforum.okta.com/u/scarter)\
**Post date:** [June 14, 2021, 2:54pm UTC](https://devforum.okta.com/t/okta-cypress-integration/14714/1 "2021-06-14T14:54:22Z")

</div>

I’m attempting to setup Okta within Cypress and running into some issues. I followed the Cypress documentation to implement the Okta Auth SDK and API calls, and have success calling both the /authn endpoint and the /authorize endpoint and getting back an authorization code. Where I am running into issues is trying to trigger the callback with the code to have our back-end server log the user in with Okta. The purpose is to avoid having to go through the Okta UI every time to log a user in.

I tried to use the token.getWithoutPrompt call, but I didn’t want the actual /token endpoint to be called, as well as trying the getWithRedirect call. Now I am writing my own cy.request calls to go through the authentication and authorize workflow and list my web server as the callback url for /authorization-code/callback to log the user in, but I am getting a 404 every time.

I can replicate this same process on the UI of the website with no issues. Is there something I am doing wrong with this integration that would be easier to follow a different path? I want to avoid storing any client secret within the integration tests and simply do a login for the user onto our server. Any help that can be provided would be appreciated.

---

<div class="post-metadata">

**Author:** ![scarter](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@scarter](https://devforum.okta.com/u/scarter)\
**Post date:** [June 22, 2021, 1:20pm UTC](https://devforum.okta.com/t/okta-cypress-integration/14714/2 "2021-06-22T13:20:40Z")

</div>

I’m not sure if anybody has seen this, but I’m still running into the issue where I cannot use the SDK in an authorization code flow to log the user in to our server.

---

<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 8, 2024, 6:33pm UTC](https://devforum.okta.com/t/okta-cypress-integration/14714/3 "2024-02-08T18:33:19Z")

</div>


