React.js春季启动安全性

问题描述:

我开发了一个应用程序,该应用程序在前端具有react,在后端具有spring-boot. 我还没有实现任何登录页面.我开始寻找一个例子.在这种情况下,示例不多,并且许多示例已过时. 有谁能指出我的榜样吗?或至少告诉我应该怎么做. 我正在使用react 0.14.0

I have developed an application with react in front and spring-boot in backend. I havent implemented any login page yet. I started to look for an example to start with. There aren't many example in this setting and many of examples are outdated. Is there anyone who can point me to an example? or show me atleast how it shouuld be done. I am using react 0.14.0

React不会为您做出有关后端或后端如何交付的任何决定(您可以使用任何可以发送HTTP的内容将其提供给客户端) /TCP到浏览器).如果您使用node.js作为后端,则可以使用运行时执行JavaScript并使用React-DOM可用的一些方法来进行一些服务器端渲染.除此之外,React只在客户端运行,一旦实例化并开始在浏览器中运行,它将接管" DOM操作.

React is doesn't make any decisions for you about your backend or how it gets delivered (you can serve it to a client with literally anything that can send HTTP/TCP to a browser). If you're using node.js as a backend, you can use the runtime to execute JavaScript and use some methods available to React-DOM to do some server-side rendering. Aside from that, React only runs client-side and will "take over" DOM manipulation once it instantiates and starts running in the browser.

就登录和安全性而言,这完全取决于您使用的任何语言和服务器框架.您可以使用普通JS或HTTP库将凭据发送到服务器,但是React与服务器端的安全性无关.

As far as login and security go, that again is completely up to whatever language and server framework you use. You can use vanilla JS or an HTTP library to send credentials to your server, but React isn't concerned with server-side security.

希望有帮助!