How do we smooth out the self-hosted WAB app and the OAuth 'Approve' workflow?

06-05-2018 10:04 AM
Occasional Contributor III

We have number of self hosted JavaScript applications with custom widgets and functionality (these have to be self hosted correct?).   The users are getting pretty annoyed with the extra clicks when opening these apps.  Right now they generally access the apps from links on the portal banner so they are already signed into the online portal.  When the browser tab opens, the application frame is loaded, then they are presented with a simple "Please sign in to continue" dialog which then takes them to a pop-up web page with the "ThisApp wants to access your ArcGIS Online account information" Approve dialog.  

* How do we make this a simpler user experience? 

* Can we add code to get thru these dialogs with at least one click rather than two?

* Why can't it "remember" that the user has Approved the app access? 

* Do we need run a local portal to make this workflow smooth? 

* We like using the online portal to create and store the "web maps" but that little bit of niceness for the admins is less a priority over the actual user experience so maybe we should drop using online web map for self hosted apps? 

I'm open to anything that make this smoother for the user i.e. they should only have to login once per session and approve once per application. We can add code, proxies, wrappers etc... 



Tags (1)
0 Kudos
3 Replies
Occasional Contributor III

In the organization portal setting, at the bottom of the general tab there's an option to ADD APP to teh App Launcher.  This allows the app to skip thru the "Approve" dialog.  

I still get the "Please Sign On" dialog, which doesn't make sense since I'm already signed in.  

Occasional Contributor III

A little more digging and I connected some dots... 

The "Please Sign On" dialog is browser gimmick to beat the pop-up blockers.  If the user initiates the pop-up from a dialog action, the browser doesn't block the "sign/approve" portal dialog.  You can see this in the API documents:

So the solution is to change the portal configuration to use the 'in-page' mode for authorization rather than the "pop-up" mode.  This is set with on OAuthoInfo:popup property.  In WAB 2.7, this hard coded in jimu.js/tokenUtils.js line 416.   Change from true to false.  Now when the app loads it will skip "please sign-in" dialog.  If you're logged into your portal and the 'auto-approve' is set as noted above, the app loads right away cleanly.  If not logged in or not 'auto-approved', the portal dialog will load inside the main page rather than the pop-up, which isn't as nice. 

New Contributor

Hi @FredSpataro ,


I have tried adding the web app into the App Launcher however it still asks me for "Permission". Do you happen to know any workaround for this issue. And yes I am using ArcGIS Online and not Enterprise.

Best regards,


0 Kudos