Google Authenticator fails on checkCode in production on PHP 7.2

120 views
Skip to first unread message

Mauritz Swanepoel

unread,
Mar 14, 2019, 11:13:08 AM3/14/19
to sonata-devs
We've recently implimented the Google Authenticator into our system and it appears to have stopped working on our production server. Locally I am able to get authenticated, but on the production server this does not seem to be the cause anymore as checkCode returns false even with the correct code. I am unable to properly debug this as I am not sure (no errors are present), it simply returns nothing. On my dev machine I am connecting to the same database as production (to rule out common data issues). The only thing I can honestly think is enviroment as my dev machine is ubuntu (PHP 7.0) whereas our production server runs centOS (PHP 7.2.16) 

We recently upgraded to PHP 7.2 and it likely could have stopped working during the PHP update, so I suspect it may either be a missing package or maybe an incompatibility with PHP 7.2 (less likely) but hoping someone can help me troubleshoot what could be wrong? 

Mauritz Swanepoel

unread,
Mar 14, 2019, 11:43:58 AM3/14/19
to sonata-devs
Appears that the server time was not set correctly. Resolved by setting time using ntp
Reply all
Reply to author
Forward
0 new messages