Search code examples
c#mongodbmeteormeteor-accounts

How to decrypt password in Meteor


is possible decrypt this type of password generated by Meteor application.

enter image description here

My idea is to use the same credentials (email and password) for my application in C #

enter image description here


Solution

  • As noted in other answers, you cannot decrypt the passwords, but you can very well use the Meteor database to authenticate in a different system.

    This is how to do it:

    In your other system, first find libraries that provide SHA256 and bcrypt implementations.

    Then take the password as entered by the user, and first compute a SHA256 digest hash from it.

    Then feed this hash string to bcrypt using number of rounds = 10 (This is the Meteor default).

    Now compare the result from bcrypt with the services.password.bcrypt from the MongoDB database of Meteor. If they match, the user provided the correct password.

    For reference, the Meteor implementation is here. It is quite simple and well commented.