<?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: Widget identifying when user logs in (Dev 1.1) in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545374#M891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2020 16:53:41 GMT</pubDate>
    <dc:creator>PhilLarkin1</dc:creator>
    <dc:date>2020-10-06T16:53:41Z</dc:date>
    <item>
      <title>Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545364#M881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How might a widget know that a user has successfully logged in? Is there a message I can listen for? Seems the message/action route isn't ready for this yet as the message list is short:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/experience-builder/api-reference/jimu-core/MessageType" title="https://developers.arcgis.com/experience-builder/api-reference/jimu-core/MessageType"&gt;https://developers.arcgis.com/experience-builder/api-reference/jimu-core/MessageType&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some other built-in method for identifying a successful log in? I'm currently waiting for props.user to populate but this is problematic for several reasons.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2020 15:30:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545364#M881</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2020-09-30T15:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545365#M882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example of why waiting for this.props&amp;nbsp;has been an issue for me. The object is sometimes Null....which seems very odd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; AllWidgetProps&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; BaseWidget&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; jsx&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; React &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'jimu-core'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; JimuMapViewComponent&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; JimuMapView &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"jimu-arcgis"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; IMConfig &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'../config'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;export&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;default&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Widget&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;extends&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;BaseWidget&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;AllWidgetProps&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;IMConfig&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; any&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="token function"&gt;constructor&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
     &lt;SPAN class="keyword token"&gt;super&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
   
     console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// This returns the props object. props.user is empty &lt;/SPAN&gt;
                             &lt;SPAN class="comment token"&gt;// as I would expect since the user has not logged in yet.&lt;/SPAN&gt;

     &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;state &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        jimuMapView&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;
     &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
activeViewChangeHandler &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;jmv&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; JimuMapView&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;jmv&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setState&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          jimuMapView&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; jmv
       &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
   &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;// "is invoked immediately after updating occurs. This method is not called for the initial render. "&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// "Use this as an opportunity to operate on the DOM when the component has been updated."&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;//https://reactjs.org/docs/react-component.html#componentdidupdate&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;componentDidUpdate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;prevProps&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   &lt;SPAN class="comment token"&gt;// console log will be updated after user logs in. &lt;/SPAN&gt;
   console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;prevProps&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;user&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// returns Null&lt;/SPAN&gt;
    console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;user&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// returns Null&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;user &lt;SPAN class="operator token"&gt;!==&lt;/SPAN&gt; prevProps&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;user&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;user&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;// Condition not met&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="token function"&gt;render&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; mvc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;p&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;Please select a map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;p&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
       &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hasOwnProperty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"useMapWidgetIds"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;useMapWidgetIds &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;useMapWidgetIds&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
       &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
       mvc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
          &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;JimuMapViewComponent
          useMapWidgetIds&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;props&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;useMapWidgetIds&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
          onActiveViewChange&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;activeViewChangeHandler&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
          &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
       &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

 &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
   &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;div className&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"widget-demo jimu-widget m-2"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;mvc&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
   &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;div&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; 
    &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:36:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545365#M882</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2021-12-11T23:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545366#M883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems as if post-login props.user is not refreshed.&amp;nbsp;This is problematic for widgets that are in a Widget Controller and are set to open by default. Since the widget is rendered before the login prompt is displayed it only has access to props rendered at that time. props.user&amp;nbsp;is effectively worthless to a widget in this scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, am I wrong? Is there a way I can force a refresh of props?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can provide.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/180371"&gt;Gavin Rehkemper&lt;/A&gt;&amp;nbsp;, &lt;A href="https://community.esri.com/migrated-users/55346"&gt;David Martinez&lt;/A&gt;&amp;nbsp;, &lt;A href="https://community.esri.com/migrated-users/422343"&gt;Mingyang Han&lt;/A&gt;‌&lt;A _jive_internal="true" data-avatarid="3059" data-externalid="" data-online="false" data-presence="null" data-userid="422343" data-username="mingyang_han-esristaff" href="https://community.esri.com/people/mingyang_han-esristaff" style="color: inherit; background-color: #ffffff; border: 0px; font-weight: bold; text-decoration: none; font-size: 14px;"&gt;Mingyang Han&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2020 17:33:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545366#M883</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2020-09-30T17:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545367#M884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use a global to check if there is a value for the user. F&lt;SPAN&gt;or example, to see if there is a username available use&lt;/SPAN&gt;&amp;nbsp;getAppStore().getState().user.username;&amp;nbsp; getAppStore is part of jimu-core.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2020 20:24:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545367#M884</guid>
      <dc:creator>DavidMartinez</dc:creator>
      <dc:date>2020-09-30T20:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545368#M885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I gave getAppStore a try but encountered the same problem as when I tried to retrieve props as shown in the earlier comment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is a way you can validate my workflow:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Add a secured map to your &lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources/blob/master/samples/widgets/editor" rel="nofollow noopener noreferrer" target="_blank"&gt;editor sample&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;In widget.tsx add this function, and call that function in return()&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #d74444; border: 0px; font-weight: inherit; font-size: 14px;"&gt;checkUserStatus&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;let test = getAppStore().getState().user
&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(test)
&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;} 
return (
{this.checkUserStatus()} )&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;3.&amp;nbsp;&lt;SPAN&gt;On the initial load of the app a user will be prompted to log in. After the map loads click on the widget, open up Dev Tools: Console will show null.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;4.&amp;nbsp;Load app again. Credentials are grabbed from the cache and both methods successfully return the user details.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My wild hypothesis is that the framework is not updating props after credentials are verified. Really struggling to find a way to make this work for secured content.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:36:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545368#M885</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2021-12-11T23:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545369#M886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That makese sense because there are no globals yet since you haven't authenticated. What you can do is do something like this where you can detect the null value of the token before the login and then check if the token exists in the componentDidUpdate function. I will check with my team to see if we have some kind of prop for successful login.&amp;nbsp;&lt;/P&gt;&lt;DIV style="color: #6688cc; background-color: #000c18; font-weight: normal; font-size: 20px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #225588;"&gt;static&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ddbb88;"&gt;mapExtraStateProps&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #2277ff;"&gt;state&lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ffeebb; text-decoration: underline;"&gt;IMState&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #2277ff;"&gt;props&lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ffeebb; text-decoration: underline;"&gt;AllWidgetProps&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #ffeebb; text-decoration: underline;"&gt;IMConfig&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt;&amp;gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ffeebb; text-decoration: underline;"&gt;Props&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9966b8;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #225588;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;!&lt;/SPAN&gt;&lt;SPAN style="color: #2277ff;"&gt;state&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt;token&lt;/SPAN&gt;&lt;SPAN style="color: #6688cc;"&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #000c18; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #225588;"&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;userLog&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #2277ff;"&gt;state&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;token&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; };&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; };&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #000c18; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #ddbb88;"&gt;componentDidUpdate&lt;/SPAN&gt;&lt;SPAN&gt;(){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9966b8;"&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;userLog&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; this.&lt;/SPAN&gt;&lt;SPAN&gt;props&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;userLog&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9966b8;"&gt;do something&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;SPAN style="color: #225588;"&gt;else&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #9966b8;"&gt;do something else`&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2020 21:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545369#M886</guid>
      <dc:creator>DavidMartinez</dc:creator>
      <dc:date>2020-10-01T21:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545370#M887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a test, the user is not updated after popup login, but the token is updated. So, can you check&amp;nbsp;"this.props.token"?&lt;/P&gt;&lt;P&gt;The user prop should be updated after login, we'll try to fix it in next release.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Oct 2020 07:50:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545370#M887</guid>
      <dc:creator>JunshanLiu</dc:creator>
      <dc:date>2020-10-04T07:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545371#M888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply. I can confirm that the token is updated after login. The user prop is not.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2020 22:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545371#M888</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2020-10-05T22:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545372#M889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David, Thank you for your reply.&amp;nbsp;&lt;BR /&gt;I suppose if a fix doesn't come by next release I could give your suggestion a try.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2020 22:43:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545372#M889</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2020-10-05T22:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545373#M890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have this logged as an issue for us to fix user prop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2020 16:19:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545373#M890</guid>
      <dc:creator>DavidMartinez</dc:creator>
      <dc:date>2020-10-06T16:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Widget identifying when user logs in (Dev 1.1)</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545374#M891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2020 16:53:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/widget-identifying-when-user-logs-in-dev-1-1/m-p/545374#M891</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2020-10-06T16:53:41Z</dc:date>
    </item>
  </channel>
</rss>

