Select to view content in your preferred language

Sign In Prompt when launching Custom ExB App in Portal

1600
6
09-02-2022 06:58 AM
Labels (1)
SerjStol
Occasional Contributor

Hello,

I've recently deployed a custom ExB App (1.9) onto the IIS which also hosts Portal web adaptor. (ArcGIS Portal 10.9.1). I followed the Deployment Guide - https://developers.arcgis.com/experience-builder/guide/deployment-topics/

I have created an App in Portal and Registered the App by copying the App ID to the clientID within "attributes" of the config.json. However, when the application is launched from Portal I get another sign in prompt even though I have registered the app as per the documentation.

Our web map is shared to the Org level only and can't be public. All of the layers except one are shared via the Portal also to the Org level. The Basemap however comes from AGOL and has stored credentials which should not get prompted, it is also shared to Org level. When developing the application I only signed in once in the ExB Dev edition.

My redirect URI is "https://<ourdomain>/appname" I assume thats fine?

Any ideas?

The application was copied to the wwwroot folder but never "Converted to Application" in IIS, but doesnt need to as per the doc?

 

SerjStol_0-1662127119483.png

 

Regards,

Serj

0 Kudos
6 Replies
DougLogsdon2
New Contributor III

For OAuth, try the following redirect:

 

https://<MY_DOMAIN>/<MY_APP>/cdn/<BUILD_NUMBER>/jimu-core/oauth-callback.html

 

0 Kudos
SerjStol
Occasional Contributor

Thanks for reply! Unfortunately, the sign in prompt still comes up. Tried incognito to wipe the cache no luck. It does not appear once you type it once but it means users first have to login to Portal then again to the Web app which is not ideal. 

0 Kudos
WeiYing1
Esri Regular Contributor

Hi,

Thanks for sharing your problem. 
Based on your description, your app is registered with a portal, and in the app there are resources hosted and shared to portal org, and basemap from AGOL shared to org as well. Here are some questions: 
1. Is the portal where the app hosted the same as the resources hosted? 
2. What's the portal it asked login in the prompt? The portal you just registered or your online org.
3. There is an item Id in the screenshot of the login popup, make sure you have access to this item? 

 

 

0 Kudos
ChenChen4
New Contributor III

Hello @WeiYing1 

I am running into the same issue. Tried Exb v.1.13 & v.1.14 but the prompt window pop-ups. All items are on Portal (single source) and I have the admin privileges. I also tried adding 2 call back urls to the Redirect urls on Portal  but it does not resolve the issue. Any suggestions?

 

Thank you,

Chen

0 Kudos
DavidWittmann
New Contributor III

@SerjStol In addition to adding the oauth-callback.html found in the jimu-core directory (thanks for the suggestion @DougLogsdon2!) to the Redirect URLs, I also added the oauth-callback.html found in the jimu-arcgis directory:

https://<MY_DOMAIN>/<MY_APP>/cdn/<BUILD_NUMBER>/jimu-arcgis/oauth-callback.html

This seems to have eliminated the back-to-back prompting for authentication in our IIS hosted ExB Dev Edition 1.13 app.

Please Note: That <BUILD_NUMBER> in the code sample above will increment with each version of the experience you publish in your local dev environment and if you re-deploy the app to IIS you will need to make sure you update the Redirect URLs in your Web Mapping Application on your Portal revised with the latest publish version. (This is a real pain to manage with multiple apps so someone please correct me if there is a better way to do this)

Now we are just working through an issue where authentication seems to be timing out which triggers another prompt for users to sign back in to the Portal.  

ChenChen4
New Contributor III

Hello, I'm having the same issue. Have you figured out a solution?