marionnewlevant / craft-snitch

Craft plugin. Report when two people might be editing the same entry, category, or global
MIT License
35 stars 15 forks source link

Snitch vs two-factor authentication #11

Closed bzin closed 5 years ago

bzin commented 5 years ago

Hello,

I am using snitch in combination with craft-twofactorauthentication but I am having an error in my browser console. I believe that this the issue is blocking me of using the 2FA..

I am assuming this because as soon as I disable snitch the 2FA starts to work and I do not see any errors in the browser console.

Following the error that I post below, I assume that snitch is executing ajax calls before the user is actually logged in the CMS. Any reason why this is needed?

VM6536:1 POST https://craft.test.com/index.php?p=admin/actions/snitch/collision/get-config 403 (Forbidden)
(anonymous) @ VM6536:1
send @ jquery.js:9566
ajax @ jquery.js:9173
postActionRequest @ Craft.js:352
doEverything @ snitch.js?v=1544048331:100
(anonymous) @ snitch.js?v=1544048331:113
snitch.js?v=1544048331:104 Uncaught TypeError: Cannot read property 'serverPollInterval' of null
    at snitch.js?v=1544048331:104
    at Object.error (Craft.js:361)
    at c (jquery.js:3317)
    at Object.fireWith [as rejectWith] (jquery.js:3447)
    at l (jquery.js:9274)
    at XMLHttpRequest.<anonymous> (jquery.js:9514)
(anonymous) @ snitch.js?v=1544048331:104
error @ Craft.js:361
c @ jquery.js:3317
fireWith @ jquery.js:3447
l @ jquery.js:9274
(anonymous) @ jquery.js:9514
load (async)
send @ jquery.js:9533
ajax @ jquery.js:9173
postActionRequest @ Craft.js:352
doEverything @ snitch.js?v=1544048331:100
(anonymous) @ snitch.js?v=1544048331:113

PS: For your information, also with two-factor-authentication disable the login still works but this error is still shown on the console.

Plugins and Craft version:

Related plugin links: https://github.com/born05/craft-twofactorauthentication

EternalBlack commented 5 years ago

I'm currently experiencing the very same issue. Unfortunately it's conflicting with 2FA... As 2FA is vital for us, we sadly had to disable it until this gets sorted out...

marionnewlevant commented 5 years ago

Have managed to recreate, so that's some progress

bzin commented 5 years ago

Great!

I hope you can fix this soon. I will love to use both plugins together.

marionnewlevant commented 5 years ago

@bzin @EternalBlack Fixed with v2.0.3. Was a javascript error caused by ajax calls not handling not getting the data they expected.