born05 / craft-twofactorauthentication

Craft plugin for two-factor or two-step login using Time Based OTP.
MIT License
36 stars 26 forks source link

Does this plugin support triggering `\yii\web\User::EVENT_AFTER_LOGIN`? #28

Closed engram-design closed 5 years ago

engram-design commented 5 years ago

Related to https://github.com/verbb/default-dashboard/issues/4, it seems this plugin may not be triggering the built-in Yii event \yii\web\User::EVENT_AFTER_LOGIN after a successful login. This means that a lot of functions that rely on this may not be triggered when using this plugin.

More of a priority, but things like Commerce (https://github.com/craftcms/commerce/blob/develop/src/Plugin.php#L304) rely on this behaviour to do certain tasks, so I'd say its relatively important.

roelvanhintum commented 5 years ago

@engram-design thanks, i'm looking into this right now. The plugin actually uses the event EVENT_AFTER_LOGIN and depending on the user's session it redirects to another page. So maybe this is blocking other plugins. I can solve this by firing the event again after we're done.

engram-design commented 5 years ago

Seems to be all fixed now, nice work!