Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login user with DDP.connect() in meteor

Tags:

meteor

I'm trying to connect two different meteor apps with DDP.connect(). How should I authenticate a user with DDP.connect() ?

like image 398
Nadee Avatar asked Nov 07 '13 07:11

Nadee


1 Answers

You can authenticate this way:

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

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

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

like image 194
Tarang Avatar answered Nov 06 '22 08:11

Tarang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!