Select to view content in your preferred language

Embed ArcGIS ExB App into a Custom App

143
0
Tuesday
Labels (1)
JarrettGreen
Regular Contributor

Hello ExB Community,

I have a custom React application that I am trying to embed various ExB applications into pages across the app. In the app, a user logs into the target portal using OAuth PCKE flow. This is the same portal where the ExB app is hosted. This is a secured ExB app and I would like the ExB app to inherit the custom app's auth. But, anytime I try to load the page with the ExB app, the iframe renders: "Item does not exist or is inaccessible."

I've followed the URL parameters here to try and have this work with both the arcgis-auth-origin and arcgis-auth-portal, but no luck: Use URL Parameters 

Here are the URLs at play:
Custom app URL: https://app.same.domain.gov

Portal URL: https://gisportal.same.domain.gov/portal

In the iframe, the source URL for the embedded ExB app is constructed like this: https://gisportal.same.domain.gov/portal/experiencebuilder/experience/?id=theItemId&arcgis-auth-origin=https://app.same.domain.gov

Even though they share the 'same.domain.gov', ExB never requests auth from the parent. Under the hood, this is using the ArcGIS REST JS library's ArcGISIdentityManager.enablePostMessageAuth() to listen for that request and pass in the credential object.

Interestingly, if I open another browser tab, sign into Portal and reload this page on my custom app, the auth is shared and the ExB application renders without errors or a sign in prompt.

Has anyone attempted something similar to this with any success?

Thanks!
Jarrett

 

0 Kudos
0 Replies