0

I have user object from database in my Blaze Helper file:

Object {_id: "mFx4Fa8aPpoFweziq", services: Object, emails: Array[1], profile: Object}

I want to login this user using above object which contains email as well as hash password.

I have following accounts packages: accounts-password accounts-ui

atulmy
  • 1,364
  • 15
  • 23

1 Answers1

2

You can login with the loginToken saved inside services.resume.loginTokens

Get the token from the array of tokens and use the following method

Meteor.loginWithToken(token, callback)

check here

that is how meteor reads the value from localstorage and automatically log you in when you re-open the website

If you don't have access token you can create one, check this

Community
  • 1
  • 1
Sasikanth
  • 3,045
  • 1
  • 22
  • 45