Security getToken fix #1986 [ci skip]