Facebook Login With WP JWT Auth

2020-08-16 03:41发布

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条回答
The star\"
2楼-- · 2020-08-16 04:24

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

查看更多
登录 后发表回答