Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在网站上显示用户的图像。
我不希望访问该站点的用户必须登录并进行身份验证,并且从我所读到的有关访问令牌的内容中,他们似乎会在一段时间后过期。
那么,如何在网页上显示我的图像而不用担心访问令牌过期?
有没有办法在我的代码中使用用户名和密码?
If I where you, I would add a check to see if the token is expired on page load, if its expired, pass your information to the API, get an new token and use that one.