Meshcentral: Invalid token, try again. At every first attempt at logon

Created on 17 Apr 2020  路  4Comments  路  Source: Ylianst/MeshCentral

I'm seeing something strange. I believe I started seeing this with 0.5.1.x (but it could have been a version or two before that). I just updated to 0.5.3 and am still seeing it.
I use 2FA for the MeshCentral logon using tokens.
It seems that every time I try to login I get an 'Invalid token, try again' message. If I immediately enter the exact same token a second time it will allow me to log in. When I finally do log in I get, as expected, an alert that 'There has been 1 failed login attempts on this account since the last login'. It doesn't seem to matter which device nor browser I'm logging in from.
At first I thought I was just entering the token incorrectly. But that is not the case.

Fixed - Confirm & Close question

All 4 comments

Also, I can duplicate this by logging out of MeshCentral and then try to log right back in. The first entry for the token fails each time (and seems to take a bit too long for it to return the 'invalid token, try again' message). Enter the same token a second time logs me right in.

are time in your server in sync?

@uldiseihenbergs Asked exactly the right question. If you are using Google Authenticator, the server time and phone time needs to be in sync. Set the clock on your server more precisely and it should work. I am guessing your server is over a minute early?

I believe this is probably the issue. I always set up my servers to synchronize with time.nist.gov But, for some reason, it wasn't syncing. So I wiped out the w32tm config and started over. This time it is syncing. Before this it was about 1 minute off. I noticed the same issue with my AD controller as well (although the MeshCentral server VM is not joined to the AD domain). Makes me wonder if some Windows update borked the config.
Hopefully this will be the fix. I'm fairly confident it will be.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

petervanv picture petervanv  路  3Comments

robclay picture robclay  路  3Comments

M1CK431 picture M1CK431  路  3Comments

nroach44 picture nroach44  路  3Comments

MailYouLater picture MailYouLater  路  3Comments