LoginSignup
13
13

More than 5 years have passed since last update.

Devise + omniauthでTwitterのログインはメール認証をスキップしたい。

Posted at

問題

  • omniauthも使ってTwitterのログインも実装している。

  • deviseでメール認証する(confirmable)ようにした。

  • Twitterのログインだと、Emailを取得できないので、Twitterのログインのときには、メール認証せずにログインするようにしたい。

解決策

skip_confirmation! を使ってスキップすることができる。

モデル名がUserの場合は、user.skip_confirmation!

参考

ruby on rails - skipping email confirmation for omniauth users using devise - Stack Overflow

13
13
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
13
13