The invention provides an
authentication method and device as well as a storage medium. The method comprises the following steps: sending a service request to a gateway microservice by virtue of a
client, wherein the service request comprises a token prestored by the
client as well as service data; sending the service request to an
authentication microservice by the gateway microservice, verifyingthe
authentication microservice according to the token, sending a
verification result to the gateway microservice, and sending the service request to a corresponding service microservice to perform aservice flow when the gateway microservice passes
verification. The method provided by the invention takes authentication as an independent basic microservice, and other
microservices under a microservice architecture respectively can call the authentication microservice to perform authentication, so that decoupling performance is good, and the authentication management problem under the microservice architecture is solved; only a
client needs to prestore the token, and each microservice side does not need to store Session information, so that statelessness and
extensibility are realized; anduser identity information is transmitted independent of Cookie, and a CSRF risk is avoided.