display authentication popup automatically when opening MS homepage

19 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Olivier Lagouche

unread,
Jun 4, 2026, 3:13:15 AMJun 4
to mapstore-users

Hello everyone,

We would like the authentication popup to be automatically displayed when opening the MapStore home page whenever the user is not authenticated.

Before version 2024.02.02, we added the following line to the localConfig.json.patch file:

{"op": "add","path": "/initialState/defaultState/controls","value":{"LoginForm":{"enabled":true}}}

This produced the expected result.

However, after upgrading to version 2026.01.01, the authentication popup is displayed when refreshing the page and when navigating to maps, even though the user is already authenticated.

Is there a way to modify this behavior and restore the one we had with version 2024.02.02?

Thank you in advance for your help.

Olivier

Lorenzo Natali

unread,
Jun 15, 2026, 4:13:42 AM (14 days ago) Jun 15
to mapstore-users
Hi,
Thank you so much for reaching.
We want to let you know that forcing the login popup via initialState overrides is not officially supported. 
In fact, we are planning to deprecate initialState configurations in the near future.
To achieve the behavior you need, triggering the popup only for unauthenticated users, you will need to write some custom code to force it in any place, or contribute to the core to provide an option for the login plugin to automatically prompt login on startup, to configure in localConfig.json and contexts you create.

Something like:


export const autoOpenLoginEpic = (action$, store) =>
    action$.ofType('LOCATION_CHANGE').filter(() => {
            const state = store.value;
            // Check if the user is NOT authenticated
            const isAuth = isLoggedIn(store.getState());
            const isLoginEnabled =createControlEnabledSelector("LoginForm");
            // Only proceed if the user is unauthenticated and the form isn't already open
            return !isAuth && !isLoginEnabled;
        return Rx.Observable.switchMap(() => of(setControlProperty('LoginForm', 'enabled', true)))
   }));

For more questions about coding, please ask to the developer's mailing list.
Reply all
Reply to author
Forward
0 new messages