How do I compare a password generated by devise clearance_sha1 using node?
Hello,
I am trying to use the database of a ruby on rails application to authenticate users using node. I am not a ruby programmer and am having some trouble finding help for this. From what I can tell, the ruby on rails app is configured to use devise and clearance_sha1. I have access to the rails source code and the differnt servers it is running on.
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :confirmable,
:encryptable, :encryptor => :clearance_sha1
Any help is appreciated. I am using node v10.19.0.
Thank you in advance
Devise hashes passwords and stores them using bcrypt by default. Looks like that may be replaced with clearance_sha1.
That's stored in the encrypted_password column in the database table. If you implement the same hashing algorithm, you can validate them against that column.