Rechat SDK
    Preparing search index...

    Sign-in & Saved Searches

    On brokerage portal sites, visitors can sign in and save a search from the filter bar. These features are portal-only: when the page loads, the SDK checks whether a portal is registered for the current domain. On non-portal sites nothing extra renders.

    <rechat-map-filter> shows a Save search button at the end of the bar once a portal is detected, so no extra markup is needed:

    <rechat-root brand_id="YOUR_BRAND_ID">
    <rechat-listings>
    <rechat-map-filter></rechat-map-filter>
    <!-- … map, grid … -->
    </rechat-listings>
    </rechat-root>
    • A signed-in visitor gets the Save search dialog: an editable search name (pre-filled from the current filters) and an alert frequency (Instant · Daily · Weekly · Monthly · Never, Instant by default). The result shows as a toast in the bottom-right corner.
    • A visitor who is not signed in gets the Log in or sign up dialog first (Google, Facebook, or an email address that receives a sign-in link) and lands in the Save search dialog right after signing in.
    • A search that matches more than 400 listings cannot be saved. Save search then opens a Too Many Matches notice instead ("Please zoom in or apply more filters. You can save up to 400 listings.") — for a visitor who is not signed in too, before the login dialog. A search with exactly 400 listings can be saved.
    • Once signed in, a Log out button appears next to Save search. Signing in or out in one widget updates every widget on the page, and other open tabs of the site.
    • The flow survives the sign-in itself. With Google or Facebook the Save search dialog opens as soon as the popup completes. With the email link, the SDK puts the search into the link's return address: which widget the visitor was saving from, the filters they had set and, for a map search, the map viewport or drawn area. Following the link brings them back to that widget with the same search, and its Save search dialog opens at once, showing a short "Restoring your search…" state until the session and the map are ready. On a page with several widgets only the right one reacts, and a link opened on another page simply signs the visitor in.

    On phones the search input shares its row with Log out, and Save search sits at the right of the Filters / Reset filters row.

    Custom layouts built from individual <rechat-filter-*> tags do not get the button.

    To turn the whole flow off on a portal site, set save-search="false" on the root:

    <rechat-root brand_id="YOUR_BRAND_ID" save-search="false">
    

    Two DOM events fire on window:

    window.addEventListener('rechat-login:success', (e) => {
    console.log('Signed in via', e.detail.provider)
    })

    window.addEventListener('rechat-saved-search:created', (e) => {
    console.log('Saved search:', e.detail)
    })

    <rechat-login-button>, <rechat-login-dialog open>, <rechat-save-search-button> and <rechat-save-search-dialog open> remain registered for pages that need the dialogs outside the filter bar. The saved-searches history elements are registered but not part of the current design.

    <rechat-save-search-button> asks a signed-out visitor to sign in first, and brings the save dialog back automatically once sign-in finishes — including the email flow, where the magic link reloads the page or completes in another tab. Closing the sign-in dialog without signing in cancels the save.

    The same portal discovery powers the JavaScript SDK: sdk.Ready resolves when a portal is found for the current hostname (and rejects when none is). See the JavaScript SDK overview.