Hi,
We have a root / master application (application item with client_id and secret). This web application queries portal items (other appliction items) and lists them in a html table (with title, thumbnail, description). When the logged in user of my master application clicks on one of the items a new tab opens and the url points to this "sub application".
Unfortunately now the user has to sign-in again. When the user logs in, it looks like the old token of the master application stored in the esri_auth cookie is invalidated and a new token for the clicked "sub-application" is generated.
Any thumbnails (which are shown in the html table) aren't visible anymore in the master application afterwards, because it seems that the esri_auth cookie, which now has a new token from the other application, has no rights for the root application after signing into the "sub application". See the screenshot attached with the error that shows up for every thumbnail (and any other portal item requested from the root application).
So my question is: Is there any way to reuse a token for other applications? I already tried the
IdentityManager.registerToken()
method but with no luck.
My ideal workflow would be to look for the esri_auth cookie, if it exists parse the token and use it in the "sub application". If the user has the correct rights no signin dialog should pop up.