Code Monkey home page Code Monkey logo

Comments (4)

pc035860 avatar pc035860 commented on August 18, 2024

Hi @dcsan ,

I'm not familiar with node as well as passportjs, but I think passportjs already implemented an authentication flow with Facebook APIs.

The purpose of angular-easyfb module is to make it easier working with Facebook JavaScript SDK in AngularsJS, and handling user authentication is in a different level.

I'm using angular-easyfb to provide better flow and experience for users who try to "Login with Facebook". e.g. retrieves login status in cookie, makes sure user is connected with our app before sending authentication message to backend and retrieves access_token for backend etc.

from angular-easyfb.

dcsan avatar dcsan commented on August 18, 2024

@pc035860 thanks for the response! passport does indeed have a FB auth flow but its not as user friendly as the completely client side JS SDK. I prefer using your ezfb approach.

passport does handle protection of certain routes from access unless the user is logged in, sessions etc. how are you handling this auth on your main app? server side, or by doing some type of simple checks client side $scope.loginStatus for a valid FB token from the JS SDK?

from angular-easyfb.

pc035860 avatar pc035860 commented on August 18, 2024

Since our product is a single page app, almost all our API calls require authentication, which is backed by server side sessions.

And there's also an API to check if the user is logged in or not.

from angular-easyfb.

gad2103 avatar gad2103 commented on August 18, 2024

hi. thanks for the plugin. i'm trying to get it working with passport.js also but i'm a little confused how to do that. i have a login process that uses passport and express and sets auth via server backed session. i want to then be able to use the ezfb api with the authenticated front end.

i tried calling ezfb.getLoginStatus to check to make sure that user is logged in but it returned nothing...

i would appreciate any help integrating these two. thanks!

from angular-easyfb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.