The invention discloses a token synchronization method and device based on micro-service, equipment and a storage medium, and relates to the technical field of
application software development, and the method comprises the steps: analyzing a target request comprising a first token to obtain token
expiration time; and if the
current time does not exceed the token
expiration time, judging whether the remaining effective duration is greater than a target duration threshold, if the remaining effective duration is not greater than the target duration threshold and a token refreshing mark does not exist, setting the token refreshing mark in the preset cache
database, refreshing the token, and issuing an obtained second token to the front-end micro-service, the front-end micro-service accesses the back-end micro-service based on the second token; and calling the independent micro-service to analyze a first token issued by the front-end micro-service to obtain the
user identifier, so that the independent micro-service accesses a preset cache
database by using a key generated based on the
user identifier to obtain a second token, and accesses the rear-end micro-service based on the second token, and enabling the back-end micro-service to transmit the access response information to the independent micro-service for
processing. Therefore, the token synchronization efficiency can be improved.