使用WP JWT Auth登录Facebook [英] Facebook Login With WP JWT Auth

查看:139
本文介绍了使用WP JWT Auth登录Facebook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用WP JWT Auth插件登录用户从wp rest API转换为WordPress. WP JWT Auth插件需要密码才能获取令牌,现在,当我们集成Facebook登录时,由于我们不会从facebook获得密码,因此我不确定如何使用户登录.

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.

有什么建议吗?

推荐答案

昨天,我为您的问题开了一笔赏金,今天我正在回答!

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

您将需要两个WordPress插件: stionic用户

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)

完成后,您可以在邮递员中向https://example.com/wp-json/wp/v2/m_facebook/login发送发帖请求,您会发现您将获得与登录https://example.com/wp-json/jwt-auth/v1/token

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

之后,您可以配置 facebook ionic插件,就可以完成.

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

JSON API用户插件是一种替代方法,但我没有尝试过

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

有用的教程

Facebook离子登录- 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆