PreAuthUserCheckPlugins not executed anymore current demo shop?
Hello,
I'm trying to execute some custom logic to verify customers prior to login. The interface \SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\PreAuthUserCheckPluginInterface seems to be the right fit, and I remember that we enabled a plugin at some point in the project (\SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\CompanyUserPreAuthUserCheckPlugin). This plugin is also active in the current b2b demo shop (202404.0). I'm certain that at some point this was working on project level, however it appears that now the plugin is not executed during customer login. I also tested this with a fresh install of the earlier mentioned version of the b2b demo shop.
Unfortunately I'm not an expert when it comes to symfony/ spryker security bundles. I'm puzzled why this plugin is not executed anymore. Maybe someone with a deeper understanding could help me understand.
Although I can think about some alternative ways to implement the necessary functionality, a dedicated plugin seems to be the most "spryker way" of doing this. Especially since it is still active in the demo shop.
Thanks in advance,
best regards Tom
Best Answer
-
Hi, Tom,
I'm using the latest B2B demoshop, and this plugin (CompanyUserPreAuthUserCheckPlugin) is still executed on the customer login attempt, specifically method checkPreAuth.
Could you please set a breakpoint on the 1st line of this method \Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider::authenticate and see if it's triggered?
Thank you, AndriyT
1
Answers
-
Hi, Tom,
I'm using the latest B2B demoshop, and this plugin (CompanyUserPreAuthUserCheckPlugin) is still executed on the customer login attempt, specifically method checkPreAuth.
Could you please set a breakpoint on the 1st line of this method \Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider::authenticate and see if it's triggered?
Thank you, AndriyT
1 -
Although I checked this earlier, I rechecked and you're correct. The plugin is indeed executed in the current demo shop. Sorry for the confusion and thanks for the support. I'm sure I can figure out now why it's not working on project level for us.
Thanks!1
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 896 Developer Corner
- 758 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 23 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random