Could not validate OTP

Receiving “Could not validate OTP” for the last few days, I assumed it was because I was outside of the US. But now that I am home, I get the same problem on a machine i’ve developed on for years and a phone I’ve had for years as well.

Any Ideas?

Hey there.

OTP authentication relies on a time offset to generate your codes. Ensure your clock is properly in sync with the time servers. Even up to a 30-45 second drift can cause OTP issues.

If you continue to have difficulty with OTP, feel free to file a ticket at https://support.particle.io

I can confirm that this is indeed still an issue. Particle’s time checking is indeed buggy and has been for quite some time now (this is nothing new). I can log in, but only if I wait until the Google Authenticator code has elapsed by near a minute. I’m using the latest published CLI to login (3.0.0 freshly installed) so this is for sure a bug.

Also - Particle CLI fails to install required dependencies on OSX:

% particle serial monitor
! The serialport dependency is missing or invalid.
! Please reinstall: https://docs.particle.io/tutorials/developer-tools/cli/#installing
Cannot find module 'serialport'
Require stack:

  • /Users/jensa/.nvm/versions/node/v17.3.0/lib/node_modules/particle-cli/dist/lib/require-optional.js
  • /Users/jensa/.nvm/versions/node/v17.3.0/lib/node_modules/particle-cli/dist/cmd/serial.js
  • /Users/jensa/.nvm/versions/node/v17.3.0/lib/node_modules/particle-cli/dist/cli/serial.js
  • /Users/jensa/.nvm/versions/node/v17.3.0/lib/node_modules/particle-cli/dist/cli/index.js
  • /Users/jensa/.nvm/versions/node/v17.3.0/lib/node_modules/particle-cli/dist/app/cli.js
  • /Users/jensa/.nvm/versions/node/v17.3.0/lib/node_modules/particle-cli/dist/index.js

Is your 2FA app’s device’s clocked synced automatically?
There are no other reports of 2FA time mismatches at the moment. The code was recently reviewed and no issues were identified.

Did it persist a reinstall? What MacOS version are you on?

I’m on OSX 11.6. Same problem after reinstall. My mac is time synced to servers here in Europe (as per the OS default). My Two Factor device is an Android phone synched to my telco provider (Telia). No issues with any other 2FA. I use it one most services I use on a daily basis.

I get around it by waiting until the 2FA has elapsed, but it sure is interesting that you cannot reproduce it. I mostly just wanted to provide the solution to others with the same problem. So if you have issues, wait until the 2FA has elpased and try again :smiley:

1 Like