Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Okta is a customizable, secure, and drop-in solution to add authentication and authorization services to your applications.

(info) To set up SSO with Okta, follow instructions in here.

After Okta account is connected to Pricefx, there will be two ways to test SSO login:

  1. Okta will provide “Embed app link” which you can use to directly login to Pricefx. Example of Cypress test:

    it('Login to Price f(x) trough OKTA embed app link', () => {
    
            const embedAppLink = "https://trial-7507976.okta.com/home/trial-7507976_pricefx_2/0oa16ptwcfEfr2hrU697/aln16pujzfCtc94xi697"
            cy.visit(embedAppLink);
            cy.url().should('contain', 'pricefx'); //Asserting that we are in Pricefx page
    
            cy.get('#input28').type(username + '{enter}'); //Filling Okta username
            cy.get('#input59').type(password + '{enter}'); //Filling Okta password
            cy.waitForSpinner();
    
            cy.log(`ASSERT THAT WE ARE LOGGED INTO PRICEFX IN ${partition} PARTITION`);
            cy.url().should('contain', 'pricefx.com');
            cy.url().should('contain', `partition=${partition}`);
        });
    
  2. Login into Okta, where you will have installed Pricefx button (which will redirect you to Pricefx). Example of Cypress test:

    it('Login to Price f(x) trough OKTA dashboard', () => {
    
            const oktalink = "https://trial-7507976.okta.com/app/UserHome"
    
            cy.log('Login in into Okta dashobard first, and then from dashboard entering Pricefx app');
            cy.visit(oktalink);
            cy.get('#input28').type(username + '{enter}'); //Filling Okta Username
            cy.get('#input59').type(password + '{enter}'); //Filling Okta password
            cy.url().should('contain', 'UserHome');
    
            cy.contains('Price f(x)').invoke('attr', 'href').then(myLink => {
                cy.visit(myLink);
            }) //Making sure that we don't open website in new tab in Chrome (because Cypress can't work in new tab)
            cy.waitForSpinner();
    
            cy.log(`ASSERT THAT WE ARE LOGGED INTO PRICEFX IN ${partition} PARTITION`);
            cy.url().should('contain', 'pricefx.com');
            cy.url().should('contain', `partition=${partition}`);
         });
  • No labels