3,765
回編集
差分
Tabetai
,→user devise
before_action :authenticate_user!, unless: :devise_controller?
end</nowiki>
== DeviseとOmniauthでGoogle、Twitter、Facebook認証 ==
gem 'dotenv-rails'
$ bundle install
$ touch .env
<nowiki>HOST='example.jp'
TWITTER_API_KEY=
TWITTER_API_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
FACEBOOK_KEY=
FACEBOOK_SECRET=</nowiki>
<nowiki>gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-google-oauth2'</nowiki>
[[oauth|bundle install後のメッセージ]]