Closed bondar-artem closed 3 months ago
@astone123 do you have any updates on this issue? Or maybe any questions related to that? Thanks
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
This issue has been closed due to inactivity.
Current behavior
Used documentation to implement Programmatic Login with OKTA. https://docs.cypress.io/guides/end-to-end-testing/okta-authentication#Programmatic-Login
This code works ONLY if
baseUrl
property defined incypress.config.js
If baseUrl is not defined, programmatic login does not work. Error in the console:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://testdoman.mycompany.com') does not match the recipient window's origin ('http://localhost:62570')
Error in runner:
Your callback function returned a promise that never resolved
Trying to use
Cypress.config('baseUrl', 'https://testdoman.mycompany.com')
in the test body also does not work.isDesired behavior
Programmatic Login with OKTA should work even if baseUrl is not defined in cypress.config.js. So I can run different tests against different origins using headless authorization.
Test code to reproduce
https://github.com/cypress-io/cypress-realworld-app/blob/develop/cypress/tests/ui-auth-providers/okta.spec.ts
Remove "baseUrl" from cypress.config.js Instead of
cy.visit('/')
, use a baseUrl value.Run this spec.
Cypress Version
12.17.2
Node version
16.18.1
Operating System
macOS 12.3
Debug Logs
No response
Other
No response