OAuth Pop-up window not showing

3327
11
Jump to solution
01-03-2018 12:12 PM
MansiShah
New Contributor III

I have come across a couple of discussions here that talk about how to disable the OAuth pop up window that asks the user for their username and password but I was wondering if anything can help me with the opposite version of that problem? I want the popup to appear but it doesn't on my app. I have configured the redirect Url's (based on the discussion here: https://community.esri.com/thread/119526 ), I have also unchecked that box that allows for anonymous access. The app recognizes there are certs associated with the browser but does anyone know what else I would have to do to get the pop up window to show up?

Thank you. 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Mansi,

  Sure just change your web map from public to private access.

View solution in original post

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

Mansi,

  Sure just change your web map from public to private access.

0 Kudos
MansiShah
New Contributor III

So when I go into my Production Dashboard, my application/item isn't shared with anyone. Is that what you are referring to? It says: Shared with: The item is not shared.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mansi,

   What I mean is in AGOL you have the options to set who the content is shared with. See the attache image:

if you change that to shared with Organization instead.

0 Kudos
MansiShah
New Contributor III

I am using a pre-build (and pre set up by someone there) Esri template so when I go to the account where it is set up, I don't see how to get to the page you have pictured: 

0 Kudos
MansiShah
New Contributor III

I can go into my personal ArcGIS for Developers account and see the tabs you are talking about but that does not translate into the content manager page that hosts the template which was configured for me by someone at esri. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mansi,

  Have you asked someone else to try and access your app and verified that they are not required to login?

0 Kudos
MansiShah
New Contributor III

I'll try to get someone else on my remote team to try to login tomorrow but I feel like I should be able to login with a pop up as I will need to access the username in order to continue my development on the app. This is one of the first steps. But I will def ask someone tomorrow and see if they see a difference on their end. 

Thanks.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mansi,

   If you are logged into AGOL then you will not receive a login dialog. You can get the username from the WAB jimu.js portalUtils.getUser method.

MansiShah
New Contributor III

Is there documentation or sample code for the portalUtils class? I imported the portalUtils class in one of the js files and tried to get the username by console.log("PortalUser.getUser());" as well as "console.log(jimu.PortalUser.getUser());" but I am getting errors such as Uncaught ReferenceError: jimu not defined and Uncaught ReferenceError: PortalUser is not defined?? I have tried using Promise and .then( ) to try to resolve the callback issue but I am still getting the same ReferenceError: PortalUser is not defined at https:///// ??

0 Kudos