Facebook Login With WP JWT Auth

徘徊边缘 提交于 2019-12-22 03:48:43

问题


We are using WP JWT Auth plugin to login user to WordPress from wp rest API. WP JWT Auth plugin requires a password to get the token, now when we are integrating facebook login, I am not sure how to get the user logged in since we won't be having passwords from facebook.

Any suggestions?


回答1:


Yesterday I opened a bounty for your question and today I'm answering it!

You will need two WordPress plugins: stionic users and nextend social login (you need to configure it on order for stionic to work. Watch the video on that page in order to know how to configure it)

When done you could send a post request to https://example.com/wp-json/wp/v2/m_facebook/loginin postman and you will notice that you will get the same token that you get when logging in https://example.com/wp-json/jwt-auth/v1/token

After that, you can configure facebook ionic plugin and you are done.

JSON API User plugin is an alternative but I haven't tried it

Useful tutorials

Facebook ionic login - Wordpress ionic login



来源:https://stackoverflow.com/questions/51274669/facebook-login-with-wp-jwt-auth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!