0

I have a customized third party server that handles all the rest apis. I am using Meteor as a middleware where the user logs in and accesses all the pages. All the information in those pages is basically generated using my actual web server (built in Symfony).

So using meteor HTTP.post I send user email and password as params, and my website API returns a json with a success or failure message. On successful login, it sends back a token.

What I am not being able to do is to, as according to this success message, "login" the user on my Meteor app without creating/checking Users collection from accounts.

The flow should be: successful login? authenticate the user, consider it as logged in user and store its token in session (without storing anything on this middleware). error? prevent the user from accessing private urls

I have found various packages, but they all target specific third party servers like:

Facebook with accounts-facebook
Google with accounts-google
GitHub with accounts-github
Twitter with accounts-twitter
Meetup with accounts-meetup
Meteor Developer Accounts with accounts-meteor-developer

Can this be done?

alina
  • 291
  • 2
  • 9
  • 1
    You question contradicts itself. You want to "login user in Meteor app", but at the same time "without storing anything on this middleware [Meteor app]". – Styx Oct 06 '17 at 14:32
  • @Styx that's what's confusing me. When people use Facebook, StackOverflow or any other third party api to authenticate themselves and log into a site, does the site treat them as a new user and store them in the db? I am a bit confused about this part – alina Oct 07 '17 at 08:52
  • Yes, it stores them in the DB. If user's email matches an existing user — site logs him in, adding FB/SO/G token to user's record in DB. – Styx Oct 07 '17 at 08:59
  • Okay it makes sense now. I have to maintain a db at my end and store users' tokens, right? Because there's no native login option in my site so the users have to login using our own customized external api. – alina Oct 07 '17 at 09:16
  • Yes, something like that – Styx Oct 07 '17 at 09:21

0 Answers0