2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Rails]Deviseの有効期限設定する方法

Posted at

最近の勉強で学んだ事を、ノート代わりにまとめていきます。
主に自分の学習の流れを振り返りで残す形なので色々、省いてます。
Webエンジニアの諸先輩方からアドバイスやご指摘を頂けたらありがたいです!

URLの有効期限

設定ファイル config/initializers/devise.rb を編集

config/initializers/devise.rb
Devise.setup do |config|
  # 省略
  config.confirm_within = 1.minutes
  # 省略
end

この記述内容はアカウントを登録してから
・1分以内なら確認化
・1分以降なら確認不可
になる設定ができる!

参考記事

Deviseの有効期限設定をテストする
【Rails】deviseでURL認証付きのメールを送信してみる

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?