且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

实现通过OAuth和单页应用程序Web API

更新时间:2023-02-08 17:48:16

我们最终与SPA模板去了,对API(单独MVC一部分)做认证。
然后该API将产生唯一令牌和用户重定向到前端与网址参数令牌

We eventually went with the SPA template, doing authentication on the API (separate MVC part). Then the API would generate a unique token and redirect the user to the front-end with the token in url parameters.

前端则需要发送此令牌上的每个后续请求。

The front-end then needs to send this token on every subsequent request.