<?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>idea Sign Out Button/Option for Experience Builder in ArcGIS Experience Builder Ideas</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idi-p/921468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My organization loves the new Experience Builder application. They love how they can access multiple AGOL applications/tools and resources in one application. However, we are looking for the ability to sign out users. When my organization's users need to leave their desks, they often close their browsers to exit the application and ensure that they have signed out securely. Instead, they would like a button or an option to sign out of the application securely and take them to the sign in page of the application when they are ready to sign in again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would be a great enhancement to Experience Builder, especially as more organizations are using this application for everyday operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Nov 2020 23:28:38 GMT</pubDate>
    <dc:creator>LARAPAdmin</dc:creator>
    <dc:date>2020-11-09T23:28:38Z</dc:date>
    <item>
      <title>Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idi-p/921468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My organization loves the new Experience Builder application. They love how they can access multiple AGOL applications/tools and resources in one application. However, we are looking for the ability to sign out users. When my organization's users need to leave their desks, they often close their browsers to exit the application and ensure that they have signed out securely. Instead, they would like a button or an option to sign out of the application securely and take them to the sign in page of the application when they are ready to sign in again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would be a great enhancement to Experience Builder, especially as more organizations are using this application for everyday operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2020 23:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idi-p/921468</guid>
      <dc:creator>LARAPAdmin</dc:creator>
      <dc:date>2020-11-09T23:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder - Status changed to: Under Consideration</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1000530#M171</link>
      <description>&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So basically you would like to have an option to include a sign out button in your experience, correct? I am going to add this as an issue to see if we could add a feature to include a sign out button to log out the current user in an active session.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 04:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1000530#M171</guid>
      <dc:creator>DavidMartinez</dc:creator>
      <dc:date>2020-11-12T04:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1001281#M173</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;Yes, that is correct. We would like that feature so that our users can sign out when they have to leave their active session and sign in when they are ready to go back.&lt;/P&gt;&lt;P&gt;We hope to see this feature soon.&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 17:22:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1001281#M173</guid>
      <dc:creator>LARAPAdmin</dc:creator>
      <dc:date>2020-11-13T17:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1109234#M493</link>
      <description>&lt;P&gt;This is something my organization also needs. We have departments accessing sensitive information and they are asking for a definitive way to sign out of the application.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 14:45:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1109234#M493</guid>
      <dc:creator>AllisonMuise2</dc:creator>
      <dc:date>2021-10-20T14:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1130516#M566</link>
      <description>&lt;P&gt;YES PLEASE. This is a no-brainer for sites w/ sensitive information. We need this ASAP!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 19:34:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1130516#M566</guid>
      <dc:creator>rnrwang</dc:creator>
      <dc:date>2022-01-04T19:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1165941#M676</link>
      <description>&lt;P&gt;We also need this sign out option. Please let me know when this is going to be available.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 22:06:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1165941#M676</guid>
      <dc:creator>MichelleWang1</dc:creator>
      <dc:date>2022-04-19T22:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1259792#M1203</link>
      <description>&lt;P&gt;We also need a sign out button - users are accessing/entering sensitive data.&lt;/P&gt;&lt;P&gt;Is there any progress on this?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 10:01:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1259792#M1203</guid>
      <dc:creator>StevePritchard1</dc:creator>
      <dc:date>2023-02-20T10:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1288818#M1382</link>
      <description>&lt;P&gt;We also need this, as we also have an EXB app with sensitive data in public safety, law enforcement, and health/life safety areas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 22:27:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1288818#M1382</guid>
      <dc:creator>johnbrosowsky</dc:creator>
      <dc:date>2023-05-12T22:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1363421#M2074</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We also need this Sign In/Out.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 03:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1363421#M2074</guid>
      <dc:creator>Ranga_Tolapi</dc:creator>
      <dc:date>2023-12-21T03:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1367483#M2114</link>
      <description>&lt;P&gt;We need this too. It's also helpful for users to be able to see which account they're signed in with and switch accounts if necessary. I know I can just jump into Portal or AGO and do this, but for most of our end users, that's not intuitive.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/123963"&gt;@DavidMartinez&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/148663"&gt;@AlixVezina&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/124928"&gt;@Jianxia&lt;/a&gt;&amp;nbsp;Can you provide an update on this idea? I checked the roadmap but didn't see any mention of it. Thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 17:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1367483#M2114</guid>
      <dc:creator>HollyTorpey_LSA</dc:creator>
      <dc:date>2024-01-08T17:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1378573#M2207</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This discussion has been ongoing since 2020 !...&lt;/P&gt;&lt;P&gt;And nothing news about this update...&lt;BR /&gt;So sad because I need this too.&lt;BR /&gt;Is it possible to have a clear answer from #ESRI?&lt;/P&gt;&lt;P&gt;Is it possible Yes or No to include this option in the 2024 road map please?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 12:59:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1378573#M2207</guid>
      <dc:creator>AudeBLEUZEN</dc:creator>
      <dc:date>2024-02-06T12:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1387696#M2300</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/659017"&gt;@AudeBLEUZEN&lt;/a&gt;&amp;nbsp;, the feature is under the consideration. However the priority in 2024 s to migrating WAB widgets over. See the &lt;A href="https://community.esri.com/t5/arcgis-experience-builder-blog/arcgis-experience-builder-2024-roadmap/ba-p/1368732" target="_self"&gt;2024 roadmap&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 20:40:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1387696#M2300</guid>
      <dc:creator>Jianxia</dc:creator>
      <dc:date>2024-02-27T20:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1387705#M2301</link>
      <description>&lt;P&gt;You can try putting a button on your experience with a label like "sign out" and configure the button to link to a URL and open in app window:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/sharing/rest/oauth2/signout?client_id=arcgisonline&amp;amp;redirect_uri=https://experience.arcgis.com/experience/YOUR_WEB_EXPERIENCE_ITEM_ID/?org=YOUR_ORG_SHORTNAME&amp;amp;signout=true" target="_self"&gt;https://www.arcgis.com/sharing/rest/oauth2/signout?client_id=arcgisonline&amp;amp;redirect_uri=https://experience.arcgis.com/experience/YOUR_WEB_EXPERIENCE_ITEM_ID/?org=YOUR_ORG_SHORTNAME&amp;amp;signout=true&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:11:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1387705#M2301</guid>
      <dc:creator>johnbrosowsky</dc:creator>
      <dc:date>2024-02-28T23:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1389413#M2329</link>
      <description>&lt;P&gt;Needed! Homogeneous across all esri apps (Storymap has it, Dashboards doesn't, ...).&lt;/P&gt;&lt;P&gt;It is criticized by our information security after pen-tests, so we actually have to manually squeeze a logout button / ref link into all these products now... would love to see this built in.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 13:52:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1389413#M2329</guid>
      <dc:creator>AndreasEugster</dc:creator>
      <dc:date>2024-03-01T13:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1389429#M2330</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/116068"&gt;@AndreasEugster&lt;/a&gt;&amp;nbsp;- dashboard already has it built in.&amp;nbsp; Just add the header element to your dashboard and then you user can sign out from the menu button on the far right side of the dashboard header.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 14:13:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1389429#M2330</guid>
      <dc:creator>johnbrosowsky</dc:creator>
      <dc:date>2024-03-01T14:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1391887#M2358</link>
      <description>&lt;P&gt;This really would be helpful!&amp;nbsp; Currently having an issues of people accessing an Experience Builder app through a mobile device and there is no option to sign in.&amp;nbsp; They have to log into portal first, then find the EXB. app, and then open it...too many steps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 15:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1391887#M2358</guid>
      <dc:creator>PamelaLocke1</dc:creator>
      <dc:date>2024-03-06T15:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1403797#M2473</link>
      <description>&lt;P&gt;Yes, please add this.&lt;/P&gt;&lt;P&gt;Besides protecting maps from the wrong viewers, it helps with testing apps.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 13:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1403797#M2473</guid>
      <dc:creator>Joel</dc:creator>
      <dc:date>2024-04-01T13:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1408666#M2530</link>
      <description>&lt;P&gt;Please add this! Testing various users access to data and layers is a PITA without a sign out button. Such a pain to close out, clear cookies, and reopen.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 18:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1408666#M2530</guid>
      <dc:creator>MattBell1</dc:creator>
      <dc:date>2024-04-11T18:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1598852#M3852</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Fully support this request.&lt;/P&gt;&lt;P&gt;As a developer and user I work with a large range of user logins and a &lt;STRONG&gt;Sign In&lt;/STRONG&gt; / &lt;STRONG&gt;Sign Out&lt;/STRONG&gt; option is essential to manage my Experience Builder sessions.&lt;/P&gt;&lt;P&gt;Would love to see this in the next release.&lt;/P&gt;&lt;P&gt;Many thanks, Pete&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 03:11:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1598852#M3852</guid>
      <dc:creator>peterverwey_ses</dc:creator>
      <dc:date>2025-03-25T03:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sign Out Button/Option for Experience Builder</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1598953#M3856</link>
      <description>&lt;P&gt;I did my own widget to logout, this do a similar popup that you have on the portal site. The only thing I did not have time is to override the onclick before the default widget window open. I would appreciate if anyone find that.&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { React, getAppStore, appActions, type IMUser, type IMState, jsx, type AllWidgetProps } from 'jimu-core'
import { WidgetPlaceholder, Button, Card, CardBody, Popper } from 'jimu-ui'
import { useEffect, useState, useRef } from 'react'
import { useSelector } from 'react-redux'
import '../style.css'

export default function Widget (props: AllWidgetProps&amp;lt;any&amp;gt;) {
  const portalUrl = props.portalUrl?.toString()
  useEffect(() =&amp;gt; {
    console.log('Widget montado en Experience Builder 1.15')
    //Uncomment this if you just want to logout directly (**)
    //handleLogout()
    getAppStore().dispatch(appActions.closeWidget(props.widgetId))
  }, [])

  useEffect(() =&amp;gt; {
    console.log('Antes de obtener el controllerwidgetid' + props.widgetId)
    if (props.widgetId) {
      console.log('Seteando variable del controller')
      const btn = document.querySelector('[data-widgetid="' + props.widgetId + '"] button')
      if (btn) {
        const btnHtml = btn as HTMLElement
        setControllerBtn(btnHtml)
        setVisible(true)
        //Eliminamos cualquier 'onclick' que tenga el elemento, para evitar acumulación de eventos
        btnHtml.onclick = null
        btn.addEventListener('click', (event) =&amp;gt; {
          event.stopPropagation() // Evita propagación de eventos
          toggleMenu()
        })
      }
    }
  }, [props.widgetId])

  const getClientId = () =&amp;gt; {
    const state = getAppStore().getState()
    return state?.clientId || 'No se encontró Client ID'
  }

  const handleLogout = async () =&amp;gt; {
    // :keycap_1:&lt;/img&gt; Hacer logout en ArcGIS
    const clientId = getClientId() // Tu client_id
    const redirectUri = encodeURIComponent(window.location.origin + window.location.pathname) // Redirigir a la app
    //if (!getAppContext()?.isInBuilder) redirectUri = window.location.href
    const logoutUrl = `${portalUrl}/sharing/rest/oauth2/signout?client_id=${clientId}&amp;amp;redirect_uri=${redirectUri}`
    try {
      await fetch(logoutUrl, { credentials: 'include' })

      // :keycap_2:&lt;/img&gt; Borrar credenciales almacenadas
      document.cookie.split(';').forEach((c) =&amp;gt; {
        document.cookie = c
          .replace(/^ +/, '')
          .replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/')
      })
      sessionStorage.clear()
      localStorage.clear()
      //if (!appContext.isInBuilder)
      // :keycap_3:&lt;/img&gt; Redirigir manualmente a la página de inicio
      window.location.href = window.location.origin + window.location.pathname
    } catch (error) {
      console.error('Error al cerrar sesión:', error)
    }
  }

  const [visible, setVisible] = useState(false)
  const [controllerBtn, setControllerBtn] = useState&amp;lt;HTMLElement | null&amp;gt;(null)
  // Obtener usuario autenticado desde ArcGIS Experience Builder
  const user: IMUser = useSelector((state: IMState) =&amp;gt; state.user)
  const username = user?.username || 'Usuario desconocido'
  const fullName = user?.fullName || 'Usuario'
  const userThumbnail = user?.thumbnail
    ? `${portalUrl}/sharing/rest/community/users/${username}/info/${user.thumbnail}`
    : require('../anonimo.jpg')

  // Alternar visibilidad del menú
  const toggleMenu = () =&amp;gt; {
    setVisible(!visible)
  }

  // Cierre de sesión
  const cerrarSesion = () =&amp;gt; {
    const confirmar = window.confirm('¿Estás seguro de que deseas cerrar sesión?')
    if (confirmar) {
      handleLogout()
      setVisible(false)
    }
  }
  //Just return null if you only want logout, in that case don't forget to uncomment (**)
  //return null

  return (
    &amp;lt;div&amp;gt;
      {
        /* Menú desplegable desde el botón del controlador */
      }
      {controllerBtn &amp;amp;&amp;amp; (
        &amp;lt;&amp;gt;
         {/* Agregar evento al botón del controlador para abrir el menú */}
      &amp;lt;Button onClick={toggleMenu} style={{ visibility: 'hidden' }}&amp;gt;
        Invisible Trigger
      &amp;lt;/Button&amp;gt;
       {/* Popper anclado al botón del controlador */}
        &amp;lt;Popper reference={controllerBtn} open={visible} placement='bottom' modifiers={[
          { name: 'preventOverflow', options: { boundary: 'window' } },
          { name: 'offset', options: { offset: [0, 8] } }
        ]}&amp;gt;
          &amp;lt;Card className='user-menu'&amp;gt;
            &amp;lt;CardBody&amp;gt;
              &amp;lt;div className="d-flex justify-content-end"&amp;gt;
                &amp;lt;Button onClick={() =&amp;gt; { setVisible(false) }} className="close-btn"&amp;gt;X&amp;lt;/Button&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;div className='user-info'&amp;gt;
                &amp;lt;img src={userThumbnail} alt='Avatar' className='user-avatar-large' /&amp;gt;
                &amp;lt;p className='user-name'&amp;gt;&amp;lt;strong&amp;gt;{fullName}&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;
                &amp;lt;p className='user-username'&amp;gt;{username}&amp;lt;/p&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;hr /&amp;gt;
              &amp;lt;p className='menu-option'&amp;gt;
                &amp;lt;a href={`${portalUrl}/home/user.html`} target="_blank" rel="noopener noreferrer"&amp;gt;
                  Mi perfil
                &amp;lt;/a&amp;gt;
              &amp;lt;/p&amp;gt;
              &amp;lt;p className='menu-option'&amp;gt;
                &amp;lt;a href={`${portalUrl}/home/user.html#settings`} target="_blank" rel="noopener noreferrer"&amp;gt;
                  Mi configuración
                &amp;lt;/a&amp;gt;
              &amp;lt;/p&amp;gt;
              &amp;lt;p className='menu-option'&amp;gt;
                &amp;lt;a href={`${portalUrl}/portalhelp/es/portal/`} target="_blank" rel="noopener noreferrer"&amp;gt;
                  Ayuda
                &amp;lt;/a&amp;gt;
              &amp;lt;/p&amp;gt;
              &amp;lt;hr /&amp;gt;
              &amp;lt;Button type='primary' onClick={cerrarSesion} block&amp;gt;
                Cerrar Sesión
              &amp;lt;/Button&amp;gt;
            &amp;lt;/CardBody&amp;gt;
          &amp;lt;/Card&amp;gt;
        &amp;lt;/Popper&amp;gt;
        &amp;lt;/&amp;gt;
      )}
    &amp;lt;/div&amp;gt;
  )
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Mar 2025 13:46:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-ideas/sign-out-button-option-for-experience-builder/idc-p/1598953#M3856</guid>
      <dc:creator>DanielRivero</dc:creator>
      <dc:date>2025-03-25T13:46:04Z</dc:date>
    </item>
  </channel>
</rss>

