Disabling Sign In Popup

2440
8
Jump to solution
12-23-2022 11:00 AM
MarkEastwood
Frequent Contributor

Hi All,

When opening an experience we are getting a popup widow asking us to sign in to ArcGIS Online. Clicking "Okay" then opens up the panel where we can enter in our credentials but we would like to bypass the initial popup.

MarkEastwood_0-1671821927646.png

In Web AppBuilder, we were able to disable the initial sign in panel by editing the ./jimu.js/tokenUtils.js file. On line 17 of the code snippet below, setting the popup parameter to false hides the sign in popup. Is there something similar in the Experience Builder code? 

registerOAuthInfo: function(portalUrl, appId){
      var validParams = portalUrl && typeof portalUrl === 'string' &&
       appId && typeof appId === 'string';
      if(!validParams){
        return null;
      }
      var oAuthInfo = esriNS.id.findOAuthInfo(portalUrl);
      if(!oAuthInfo){
        var oauthReturnUrl = window.location.protocol + "//" + window.location.host +
         require.toUrl("jimu") + "/oauth-callback.html";
        //OAuth will lose 'persist' query parameter if set expiration to two weeks exectly.
        oAuthInfo = new OAuthInfo({
          appId: appId,
          expiration: 14 * 24 * 60 - 1,
          portalUrl: portalUrl,
          authNamespace: '/',
          popup: false,
          popupCallbackUrl: oauthReturnUrl
        });
        esriNS.id.registerOAuthInfos([oAuthInfo]);
      }
      oAuthInfo.appId = appId;
      return oAuthInfo;
    },

 

1 Solution

Accepted Solutions
BrandonWebb
Occasional Contributor

Yes as @RajatBatham said, modify the jimu-arcgis/index.js in the deployed application.  You can search the file for popup:!0 and replace with popup:false.  You must clear your browser cache to see results.

View solution in original post

8 Replies
KamilNovák
Regular Contributor

I don't have a solution but I would also like to know if there is a solution.

Thanks.

0 Kudos
mohannainar1
Occasional Contributor

Hi @MarkEastwood  did you find the solution ?. If so can you please tell me how to disable the login popup. I too facing the same issue

0 Kudos
JonNordling3
Emerging Contributor

Any solution on this?

0 Kudos
RajatBatham
New Contributor

The same method you will be able to find in jimu-arcgis/index.js and then just do the same as we did in Web App builder

BrandonWebb
Occasional Contributor

Yes as @RajatBatham said, modify the jimu-arcgis/index.js in the deployed application.  You can search the file for popup:!0 and replace with popup:false.  You must clear your browser cache to see results.

AllenovDmitriy
Occasional Contributor

There is no popup:!0 in jimu-arcgis/index.js file in version 1.17

0 Kudos
RajatBatham
New Contributor

with 1.17 version, ESRI have moved this method to jimu-core/index.js.

search for popup:!0 and replace it with popup:!1.

0 Kudos
AllenovDmitriy
Occasional Contributor

Now I have to login with full window interface ☹️

How to disable login procedure in ExB application, if I have already logged into the portal on the adjacent tab?

0 Kudos