Impersonating Agent and Customer log out each other

pn
pn Spryker Customer Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet
edited August 8 in Spryker Development

Hi fellow Devs πŸ‘‹

I noticed, that an agent that is impersonating a customer is being logged out if the customer logs in.
Also the other way around, a customer is being logged out if an agent impersonates this customer.
(Tested with https://github.com/spryker-shop/b2b-demo-shop current master)

This seems to be related to `\SprykerShop\Yves\SessionAgentValidation\Plugin\Security\ValidateAgentSessionSecurityPlugin` and `\SprykerShop\Yves\SessionCustomerValidationPage\Plugin\Security\ValidateCustomerSessionSecurityPlugin`.

If you remove these two Plugins from `\Pyz\Yves\Security\SecurityDependencyProvider::getSecurityPlugins` you are able to keep both, agent and customer, logged in.

Is this intended behavior? Are there maybe any known workarounds?


Best, Pascal

Best Answer

  • profuel
    profuel SSA Sprykee Posts: 76 πŸͺ - Explorer
    Answer βœ“

    Hi, Pascal!

    You're absolutely right, these plugins are doing exactly what you described as not desired behaviour.

    The reason we use these plugins - you may have sync issues with cart, when a customer and his agent are working with it.

    If you are sure that your customers are careful and do not try to act parallel to the agent, you may remove these plugins, or just one of them.

    I hope it helps.

Answers

  • profuel
    profuel SSA Sprykee Posts: 76 πŸͺ - Explorer
    Answer βœ“

    Hi, Pascal!

    You're absolutely right, these plugins are doing exactly what you described as not desired behaviour.

    The reason we use these plugins - you may have sync issues with cart, when a customer and his agent are working with it.

    If you are sure that your customers are careful and do not try to act parallel to the agent, you may remove these plugins, or just one of them.

    I hope it helps.

  • pn
    pn Spryker Customer Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hey profuel,

    thank you very much!

    Best, Pascal