Google login not working due to incorrect server time

“Invalid IAT” suggests that your server thinks that google issued the authorisation token in the future! You can see the exact logic here (by taking the line number from the top of your backtrace):

https://github.com/jwt/ruby-jwt/blob/master/lib/jwt/verify.rb#L48

My guess is that your server’s clock is incorrect. Even being 1 second out would be enough to cause this.

Also, the URL you pasted is malformed. For example, it includes ?state= twice! I guess this was a copy/paste error, but if not then there must be something else wrong.

7 Likes