Custom administrator login identity provider (SSO)

We’d like to use our own identity provider (keycloak) to let our employees do their jobs across multiple stores and applications using the same login, and with single sign-on. We wanted to add this ability to our new shopware installations too but we seem to be struggling because shopware does not load the full application until after login:

    startBootProcess(): Promise<void|ApplicationBootstrapper> {
        const loginService = this.getContainer('service').loginService;
        const isUserLoggedIn = loginService.isLoggedIn();

        // if user is not logged in
        if (!isUserLoggedIn) {
            loginService.logout();
            return this.bootLogin();
        }

        return this.bootFullApplication();
    }

Is there any way we can load our own javascript on the login page so we can do our single sign-on checks? The backend changes seem quite easy since it’s just symfony services and api endpoints.

Thanks.

Keycloak supported. You can also block shop pages for not logging in customers.

Sorry I did not see, that you need this for the admin login. The Plugin supports login for customers. Maybe I could write a second one for the admin login.

Hi @Moorleiche ,

Thanks for your response. We already have our storefront coupled to Keycloak with our own custom implementation. We’re looking for ways we can accomplish this ourselves on the administrator side since it’d be a highly customized solution for our specific needs. All we need to know is how we can execute our own javascript and use keycloak-js on the login page without having to completely override the admin controller and render our own login template.