Skip to main content
Inspiring
July 26, 2023
Answered

Is there an alternative to window.open in Adobe CEP?

  • July 26, 2023
  • 1 reply
  • 750 views

Hello Adobe Community,

I hope you're all doing well. I am currently working on a Creative Extensibility Platform (CEP) project and facing a specific challenge related to the use of window.open in my extension.

My CEP extension involves implementing Single Sign-On (SSO) authentication. The SSO flow requires opening an external authentication page, and I initially attempted to use window.open for this purpose. However, I discovered that window.open is not supported within the CEP environment due to security restrictions.

I am now looking for an alternative approach to achieve the SSO authentication flow within the CEP extension. Here's a brief overview of my intended flow:

1. The user clicks a "Login" button within the CEP extension.
2. This should trigger the SSO authentication process, which involves navigating to an external authentication page for login.
3. Upon successful login, the user is redirected back to my extension with necessary authentication data (e.g., User_ID).
4. I need to retrieve the authentication data from the response and use it within my CEP extension.

I would greatly appreciate any insights or suggestions on how I can implement this SSO authentication flow effectively within the constraints of the Adobe CEP environment. If there is an alternative to window.open that would work in this context, or if there are any workarounds, I would be grateful to learn about them.

Thank you all in advance for your time and expertise. I'm looking forward to hearing your valuable feedback.

Correct answer Nikhil Bhojwani

I successfully addressed this issue by implementing a creative solution. I incorporated a local Node.js server within my extension, leveraging the 'puppeteer' library for web automation. This allowed me to seamlessly interact between my extension and a web browser running on my machine. Given the straightforward nature of my requirements, I could efficiently facilitate communication and data exchange between the browser and my extension.

1 reply

Participant
September 12, 2023

Having a similar issue here, so I'm curious to hear about potentials solution regarding this. Using the csi openURLInDefaultBrowser does not cut it as it's not possible to communicate between the extension and the login page (using something like `postMessage`).

Nikhil BhojwaniAuthorCorrect answer
Inspiring
September 12, 2023

I successfully addressed this issue by implementing a creative solution. I incorporated a local Node.js server within my extension, leveraging the 'puppeteer' library for web automation. This allowed me to seamlessly interact between my extension and a web browser running on my machine. Given the straightforward nature of my requirements, I could efficiently facilitate communication and data exchange between the browser and my extension.

Participant
September 27, 2023

@Nikhil Bhojwani Thanks for the tip, really interesting to hear about that possibility since we have the same issue! Do you think you could share in a bit more detail how you did that, I don't completely understand how you ran that local Node server and how the interaction between the extension works.

 

Best regards