Disabling Sign In Popup

939
3
12-23-2022 11:00 AM
MarkEastwood
Occasional Contributor II

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;
    },

 

3 Replies
KamilNovák
New Contributor III

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

Thanks.

0 Kudos
mohannainar1
New Contributor III

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
New Contributor

Any solution on this?

0 Kudos