2

I'm trying to use 2 servers using DDP.connect. My subscription works well, but methods called using Meteor.call needs the user to be authenticated.

How can i connect the user to the remote server ?

Rebolon
  • 1,257
  • 11
  • 29
  • what kind of authentication are you using? and who (which software) is taking care of the authentication? are you running behind a proxy? or are you asking about what some of the options for implementing authentication are? – Christian Fritz Mar 17 '14 at 22:51

1 Answers1

2

You can authenticate this way:

var DDPConnection = DDP.connect(<url>);

DDPConnection.call("login", {
                             "password":"qwerty",
                             "user" : {
                                     "email":"email@email.com"
                                 }
                             },
                             function(err,result) {
                                 //Check result
                             }
                  );

Check out my other answer on the different login options depending on the setup you have/want to use.

Community
  • 1
  • 1
Tarang
  • 75,157
  • 39
  • 215
  • 276