I have a existing site in wordpress. User register only by web (wordpress). How to authenticate user from Laravel to the wordpress DB.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There are a lot of ways to do this. You could:
- 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.
There are probably still more ways to do this.