All threads / How do I compare a password generated by devise clearance_sha1 using node?
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

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.

Join the discussion

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

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

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

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.