---
title: "Discussion on \"Rails 7.1 - authenticated_by\" | Hashnode"
description: "Discussion on \"Rails 7.1 - authenticated_by\". Rails provides has_secure_password class method to store passwords securely. You need to have password_digest attribute in your model to get it working.\nFor example, if you have a user model\nclass User < ApplicationRecord\n  has_secure_password\nend\n\nT..."
url: "https://hashnode.com/posts/rails-7-1-authenticated-by/64dc52dac21e7737ca471f27"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Rails 7.1 - authenticated\_by](https://raysrashmi.hashnode.dev/rails-7-1-authenticated-by?utm_source=hashnode&utm_medium=feed)

Rails provides has\_secure\_password class method to store passwords securely. You need to have password\_digest attribute in your model to get it working. For example, if you have a user model class User < ApplicationRecord has\_secure\_password end T...

Aug 16, 2023 · 2 min read · raysrashmi.hashnode.dev  
Read the article

-   [#rails](https://hashnode.com/tag/rails)
-   [#rails-71](https://hashnode.com/tag/rails-71)
-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)

## Written by

[Rashmi Yadav](https://hashnode.com/@raysrashmi)

@raysrashmi · India

  
[View profile](https://hashnode.com/@raysrashmi)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
