Skip to content

[Bug]: sso won't work when the admin url is not /admin #45

Description

@strixnl-ronpeeters

Plugin Version

8.0.0

PHP Version

8.3

Shopware Version

6.6.10.4

Installation method

Composer

Identity provider

Google Cloud

What happened?

Hi,

We have some shopware instances where we've changed the admin url to a custom one.
This is possible by setting the SHOPWARE_ADMINISTRATION_PATH_NAME environment.
This has been made possible with commit shopware/shopware@dbb6867#diff-6c587f6135e37b9d941506d9244a333d42c26525c69334996ab128559b474cbc as far as I can see.

But this doesn't work in combination with your plugin.
The controllers will give a 412 response when calling for example /admin/open-auth/routes.

I've changed all the controllers to use the variable and then it seems to work.

I don't know if it is the correct way to fix it but it works in our case.
If it could be fixed in a next release, that would be nic.

Thanks,
Ron

Relevant log output

--- vendor/heptacom/shopware-platform-admin-open-auth/src/Http/Route/ClientLoginRoutesRoute.php    2025-05-22 19:38:02.000000000 +0200
+++ vendor/heptacom/shopware-platform-admin-open-auth/src/Http/Route/ClientLoginRoutesRoute.php    2025-12-10 13:24:31.656924423 +0100
@@ -18,7 +18,7 @@
     }

     #[Route(
-        path: '/admin/open-auth/routes',
+        path: '/%shopware_administration.path_name%/open-auth/routes',
         name: 'administration.heptacom.admin_open_auth.routes',
         defaults: [
             'auth_required' => false,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions