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.