douzi6992 2016-02-16 12:43
浏览 141

使用facebook登录作为移动应用的身份验证。

I'm using laravel 5.2 to make an rest API for mobile apps. For authentication in the mobile apps they should only use Facebook login. So my question is how can i implement this rest api with facebook authentication.

I was thinking to make a users model at the server side and when a user logins with facebook from the app I get all the information for the user and save it in the users model, like name email photo ect. If the user is already registered in my users model I was thinking to get the users email address from facebook and compare it to users in my users model to get the users info.

According to accesstoken I was thinking to use JWT, but I'm not sure how? My solution could maybe be when a user login with facebook my api either save the user or get the user and then return and JWT token. Hope you guys understand my problem and can help me out - Thank you.

  • 写回答

2条回答 默认 最新

  • doupafu6980 2016-02-16 12:59
    关注

    I think facebook login should be implemented on front end , there are simple ios / android sdks for facebook login and on login user gets the info as requested in facebook developer account and then using a simply api that info can be stored at your server side , just create a user id for that user to identify uniquely

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog