<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Blocking end-users from seeing application until after login in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1600151#M18177</link>
    <description>&lt;P&gt;It is on our roadmap to filter user group for resource accessing. It may come in 2026.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Mar 2025 20:54:15 GMT</pubDate>
    <dc:creator>Wei_Ying</dc:creator>
    <dc:date>2025-03-27T20:54:15Z</dc:date>
    <item>
      <title>Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1546231#M15262</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;I have created several experience builder applications using the developer version. These have a lot of custom widgets that I would prefer the public to not be able to view. My application is hosted and currently accessible from anyone with access to the URL. They can't see any of the data, since they need to be logged into our org to see all the good stuff.&lt;/P&gt;&lt;P&gt;However, as of right now, the application will load all aspects of the application except for the data, allowing anyone to see things like the custom widgets (although they won't run) and our custom layer lists (which does list what data we use).&lt;/P&gt;&lt;P&gt;While I understand that anyone could simply right click and dig into the source code for these if they wanted to, I was wondering if anyone has had any luck displaying a blank screen until authentication has been completed? Or have any ideas how I would implement that&lt;/P&gt;&lt;P&gt;Web appbuilder developer edition does this by default when deployed, it's frustrating that experience builder doesn't out of the box.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 17:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1546231#M15262</guid>
      <dc:creator>ericsamson_tract</dc:creator>
      <dc:date>2024-10-07T17:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1547852#M15383</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/670569"&gt;@ericsamson_tract&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your feedback! Since you deploy the app on your own server, instead of&amp;nbsp;ArcGIS platform, so we cannot simply use the auth process from ArcGIS.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You may try to set up a credential requirement for your server, so when user accessing your server, they need a credential when visiting the URL.&amp;nbsp;&lt;BR /&gt;So far there is no easy way to do from ExB. Otherwise, you may customize a landing page with customized login widget to ask user for credential, where after user logged in redirect them to the true app.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;We are actually working on a Login widget, which might help solve your case in future.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Wei&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 01:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1547852#M15383</guid>
      <dc:creator>Wei_Ying</dc:creator>
      <dc:date>2024-10-11T01:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1559382#M16023</link>
      <description>&lt;P&gt;In case anyone else finds this, I was able to figure it out. My solution involves simply blocking the following css classes if the user is not authenticated:&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;'controller-container' and&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;'widget-content'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Of course people can work around this if they really want to, so take it with a grain of salt. It works for my purposes. I wrote the following code and put it within the index.html file:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;script&amp;gt;
	const moduleScript = document.createElement('script');
	moduleScript.type = 'module';
	moduleScript.textContent = `
		// Import required modules using SystemJS
		System.import('jimu-core').then((jimuCore) =&amp;gt; {
			const { getAppStore, SessionManager } = jimuCore;
			
			let isAuthenticated = false;

			const setElementVisibility = (element, visible) =&amp;gt; {
				element.style.setProperty('display', visible ? 'block' : 'none', 'important');
			};

			const handleElements = (visible) =&amp;gt; {
				const widgetElements = document.getElementsByClassName('controller-container');
				const cacheElements = document.getElementsByClassName('widget-content');
				
				Array.from(widgetElements).forEach(element =&amp;gt; setElementVisibility(element, visible));
				Array.from(cacheElements).forEach(element =&amp;gt; setElementVisibility(element, visible));
			};

			const observer = new MutationObserver((mutations) =&amp;gt; {
				mutations.forEach((mutation) =&amp;gt; {
					if (mutation.addedNodes.length) {
						mutation.addedNodes.forEach((node) =&amp;gt; {
							if (node.classList) {
								if (node.classList.contains('controller-container') ||
									node.classList.contains('widget-content')) {
									setElementVisibility(node, isAuthenticated);
								}
							}
						});
					}
				});
			});

			observer.observe(document.body, {
				childList: true,
				subtree: true
			});

			const checkAuth = () =&amp;gt; {
				try {
					const userInfo = getAppStore().getState().user;
					const session = SessionManager.getInstance().getMainSession();
					const authCover = document.getElementById('auth-cover');

					if (userInfo &amp;amp;&amp;amp; session &amp;amp;&amp;amp; session.token) {
						console.log("User authenticated:", userInfo.username);
						isAuthenticated = true;
						
						if (authCover) {
							authCover.style.opacity = '0';
							setTimeout(() =&amp;gt; {
								authCover.remove();
							}, 300);
						}
						
						handleElements(true);
						return true;
					} else {
						console.log("User not authenticated");
						isAuthenticated = false;
						
						if (authCover &amp;amp;&amp;amp; !document.body.contains(authCover)) {
							document.body.insertBefore(authCover, document.body.firstChild);
							authCover.style.opacity = '1';
						}
						
						handleElements(false);
						return false;
					}
				} catch (error) {
					console.warn("Error checking authentication:", error);
					isAuthenticated = false;
					return false;
				}
			};

			// resize window catch
			let resizeTimeout;
			window.addEventListener('resize', () =&amp;gt; {
				clearTimeout(resizeTimeout);
				resizeTimeout = setTimeout(() =&amp;gt; {
					if (isAuthenticated) {
						handleElements(true);
					} else {
						handleElements(false);
					}
				}, 100);
			});

			handleElements(false);

			// check on authentication 
			let attempts = 0;
			const maxAttempts = 30;
			const interval = setInterval(() =&amp;gt; {
				attempts++;
				if (checkAuth() || attempts &amp;gt;= maxAttempts) {
					clearInterval(interval);
				}
			}, 1000);
		}).catch(error =&amp;gt; {
			console.error("Error importing jimu-core:", error);
		});
	`;

	window.addEventListener('load', function() {
		const checkSystemJS = setInterval(() =&amp;gt; {
			if (window.System) {
				clearInterval(checkSystemJS);
				document.body.appendChild(moduleScript);
			}
		}, 100);
	});
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1559382#M16023</guid>
      <dc:creator>ericsamson_tract</dc:creator>
      <dc:date>2024-11-15T21:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1587419#M17490</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/184441"&gt;@Wei_Ying&lt;/a&gt;&amp;nbsp;!&lt;BR /&gt;Are there any updates on this?&lt;BR /&gt;&lt;BR /&gt;This widget is very relevant for our team.&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Currently, we are considering developing our own widget that will check which user logs in and filter the interface data accordingly (using &lt;EM&gt;data_filter&lt;/EM&gt;).&lt;BR /&gt;Is this a good solution in terms of web security?&lt;BR /&gt;&lt;BR /&gt;There is my open issue:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-enterprise-questions/how-to-display-different-data-per-user-in-an/m-p/1585984" target="_blank"&gt;https://community.esri.com/t5/arcgis-enterprise-questions/how-to-display-different-data-per-user-in-an/m-p/1585984&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 11:07:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1587419#M17490</guid>
      <dc:creator>Nadia_Matsiuk</dc:creator>
      <dc:date>2025-02-20T11:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1600151#M18177</link>
      <description>&lt;P&gt;It is on our roadmap to filter user group for resource accessing. It may come in 2026.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 20:54:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1600151#M18177</guid>
      <dc:creator>Wei_Ying</dc:creator>
      <dc:date>2025-03-27T20:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1646691#M20653</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/184441"&gt;@Wei_Ying&lt;/a&gt;&amp;nbsp;wanted to follow up on this. Any updates on the login widget you mentioned?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 22:48:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1646691#M20653</guid>
      <dc:creator>ericsamson_tract</dc:creator>
      <dc:date>2025-08-28T22:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1666846#M21694</link>
      <description>&lt;P&gt;The login widget has been supported on October 2025 release.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 19:22:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1666846#M21694</guid>
      <dc:creator>Wei_Ying</dc:creator>
      <dc:date>2025-11-18T19:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking end-users from seeing application until after login</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1670592#M21856</link>
      <description>&lt;P&gt;Great news, thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/184441"&gt;@Wei_Ying&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to figure out how to use this widget to accomplish the above. Are there any examples or demos available for this widget yet? I am having trouble figuring out the functionality&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 17:59:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/blocking-end-users-from-seeing-application-until/m-p/1670592#M21856</guid>
      <dc:creator>ericsamson_tract</dc:creator>
      <dc:date>2025-12-04T17:59:48Z</dc:date>
    </item>
  </channel>
</rss>

