omniauth for rails and ios authentication

♀尐吖头ヾ 提交于 2019-12-01 03:39:48

I was able to achieve this using the omniauth-facebook-access-token Gem. https://github.com/SoapSeller/omniauth-facebook-access-token

Create another oauth provider in your devise initializer called 'facebook_access_token', it can use the same credentials as the facebook provider.

Post the token as the param 'access_token'. Use the query string ?format=json on the callback url if you want the final response from your app returned as JSON.

When you creates a facebook(fb) app, you should indicate where is located the url callback, probably you set it in fb as: http://localhost:3000/bla/bla It works fine if you are testing in your own machine but to be able to test in your ios device then you should change localhost for something like your machine's ip (Ex. 192.168.1.1)

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