从Laravel向WordPress数据库授权用户 [英] Auth user from Laravel to Wordpress Database
本文介绍了从Laravel向WordPress数据库授权用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在wordpress中有一个现有站点.用户仅通过网络(wordpress)进行注册.如何验证从Laravel到wordpress数据库的用户.
I have a existing site in wordpress. User register only by web (wordpress). How to authenticate user from Laravel to the wordpress DB.
推荐答案
有很多方法可以做到这一点.您可以:
There are a lot of ways to do this. You could:
- 在Laravel应用上使用自定义身份验证驱动程序以使用WordPress数据库. 汉普尔的包裹就是这样做的.
- 使用自定义身份验证提供程序来验证WordPress用户. Laravel WP用户软件包可以做到这一点,并且它还支持REST API.
- 使用 Laravel WP密码软件包,覆盖Laravel的哈希值以使WordPress兼容的密码哈希.您可以在此处详细了解. li>
- 替换WordPress的内置身份验证
- 使用 Auth0 .
- Use a custom authentication driver on your Laravel app to use WordPress database. Hampel's package does this.
- Use a custom authentication provider to authenticate WordPress users. Laravel WP User package can do this, and it also support REST API.
- Override Laravel's hashing to make WordPress compatible password hashes using Laravel WP Password package. You can read more about this here.
- Replace WordPress's built-in authentication.
- Use Auth0.
可能还有更多方法.
这篇关于从Laravel向WordPress数据库授权用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文