Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I compare a password generated by devise clearance_sha1 using node?

Matt H asked in General

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

Reply

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.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.