What happens when response fails to reach the client in a token authenticated API?

老子叫甜甜 提交于 2019-12-07 06:58:20

问题


This explains how token authentication works in rails when this lib is used.

But, if this (as shown in image below) happens, should I sign-in again to get a new valid token that can be used for the next request? This doesn't seem so good as network failure might often happen; isn't there a simple "RETRY" way?

EDIT: The server would accept the retry request, if it reaches within 5 seconds since the previous one, essentially treating it as a batch request. However, this wouldn't help solve my problem.

来源:https://stackoverflow.com/questions/39276885/what-happens-when-response-fails-to-reach-the-client-in-a-token-authenticated-ap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!