[英]Can I get user password from Wordpress database for React application?
Im wondering if this is a good idea or even possible as I cant find an example... 我想知道这是一个好主意还是可能,因为我找不到一个示例...
Im attempting to create a React application(using Postgres) inside Wordpress(using MySql) because Wordpress has so much stuff built in for nice theming, posts, and especially user management accounts. 我试图在Wordpress(使用MySql)中创建一个React应用程序(使用Postgres),因为Wordpress内置了很多东西,用于漂亮的主题,帖子,尤其是用户管理帐户。 However, for each user can I get the Wordpress password and save it in another database the React application is using so as to connect the two?
但是,对于每个用户,我可以获取Wordpress密码并将其保存在React应用程序正在使用的另一个数据库中以便将两者连接吗?
Follow-up: I can probably use the REST API but that password is likely salted right? 后续:我可能可以使用REST API,但是该密码可能会被添加,对吗? Wondering what problems I'll run into before undertaking this endeavor...
想知道在进行这项工作之前我会遇到什么问题...
You don't need to copy passwords into second (any) database (or many microservices). 您无需将密码复制到第二(任何)数据库(或许多微服务)中。
It depends what you need, there are many scenarios. 这取决于您的需求,有很多方案。
You can use WP authorization to access second DB. 您可以使用WP授权来访问第二个DB。 Simplest ... you can extend WP REST API with functions operating on Postgres.
最简单的...您可以使用在Postgres上运行的功能来扩展WP REST API。 React/client won't see any difference - you can change backend 'behind scene' w/o any client change - as long as your API will be the same.
只要您的API相同,React / client就不会有任何区别-您可以在后台进行后端更改,而无需任何客户端更改。
If your app will be bigger (and independent) you can use other methods like tokens, 3rd party authorization. 如果您的应用程序将更大(并且独立),则可以使用其他方法,例如令牌,第三方授权。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.