Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本人認証が無効設定でも実行される #7

Closed
chihiro-adachi opened this issue Mar 7, 2023 · 2 comments
Closed

本人認証が無効設定でも実行される #7

chihiro-adachi opened this issue Mar 7, 2023 · 2 comments
Milestone

Comments

@chihiro-adachi
Copy link
Contributor

基本設定より、以下設定をする

  • 仮会員設定:無効
  • 本人認証:無効
  • 二段階認証:有効

会員登録を実行すると404となる。

Symfony\Component\HttpKernel\Exception\NotFoundHttpException:

  at TwoFactorAuthCustomer42/EventListener/CustomerTwoFactorAuthListener.php:247
  at Plugin\TwoFactorAuthCustomer42\EventListener\CustomerTwoFactorAuthListener->deviceAuth()
     (TwoFactorAuthCustomer42/EventListener/CustomerTwoFactorAuthListener.php:187)
  at Plugin\TwoFactorAuthCustomer42\EventListener\CustomerTwoFactorAuthListener->onKernelController()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (index.php/:83) 

二段階認証設定が有効であれば、以降の処理が実行されるためと思われます。
https://github.com/EC-CUBE/TwoFactorAuthCustomer42/blob/main/EventListener/CustomerTwoFactorAuthListener.php#L183

本人認証と二段階認証のイベントリスナーは分割したほうがよいかなと思いますがいかがでしょう

sai-gillingham added a commit to sai-gillingham/TwoFactorAuthCustomer that referenced this issue Mar 9, 2023
本人認証と二段階認証のイベントリスナーを分割すること。
EC-CUBE#7
sai-gillingham added a commit to sai-gillingham/TwoFactorAuthCustomer that referenced this issue Mar 9, 2023
本人認証:無効
二段階認証:有効
パターンの対応。
EC-CUBE#7
@KenTanaka
Copy link
Collaborator

分離する方が今後の管理も容易であるので、分離しました。

@chihiro-adachi
Copy link
Contributor Author

修正確認しました

@chihiro-adachi chihiro-adachi added this to the 1.0.0 milestone Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants