0

My question may be a little trivial since I am coming from Java background.

I have need the following with Node.js

  1. User should be able to connect to multiple social sites like Facebook, Google and Twitter at the same time.
  2. Site/module must be able to send Auth requests to each connected sites (requests may be different, but should be able to send), like posting to the wall, tweeting etc.
  3. The user (who may be connected to multiple accounts) must be able to have roles and the server-side (Node.js) will only allow actions to be performed by a set of roles.

I am also planning to use MeteorJS, does it have any implications? Do these libraries work well with each other?

I am not sure if my requirements are possible, please suggest. (may be with examples.)

laggingreflex
  • 32,948
  • 35
  • 141
  • 196
shrw
  • 1,719
  • 5
  • 27
  • 50
  • What did you try so far? – Alexander Vogt Oct 16 '13 at 15:34
  • It's really quick and easy with Meteor. Check this: http://docs.meteor.com/#accountsui – Konstantin K Oct 16 '13 at 15:37
  • My next question is does it make sense to use angular? because meteor is anyways working like angular.. If there is a usecase,,if yes, let me know which package to choose from atmosphere.meteor.com,, i see couple of them here. – shrw Oct 17 '13 at 11:04

1 Answers1

0

https://github.com/ganarajpr/express-angular definitely covers a quite a few of your requirements and works out of the box as a seed for a web app.

It supports Google, facebook and twitter integration using everyauth.

To make posts to the a Facebook wall, you would only need the request module once you are authenticated

See http://runnable.com/UTlPM1-f2W1TAABY/post-on-facebook for a live demo

As for group based roles, there are multiple ways of implementing this:

  1. Use https://github.com/ForbesLindesay/connect-roles, ex:

    app.get('/', function (req, res) {
      if (req.user.is('admin')) {
        res.render('home/admin');
      } else if (user.can('login')) {
        res.render('home/login');
      } else {
        res.render('home');
      }
    })
    
  2. Use regular express routing, for an example please see Group/rule-based authorization approach in node.js and express.js

Hope this helps.

Community
  • 1
  • 1
enducat
  • 1,676
  • 3
  • 17
  • 16