adds support for Facebook OAuth
This commit is contained in:
@@ -4,5 +4,6 @@
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
twitter_key: <%= ENV["TWITTER_KEY"] %>
|
||||
twitter_secret: <%= ENV["TWITTER_SECRET"] %>
|
||||
facebook_key: <%= ENV["FACEBOOK_KEY"] %>
|
||||
facebook_secret: <%= ENV["FACEBOOK_SECRET"] %>
|
||||
server_name: <%= fetch(:server_name) %>
|
||||
|
||||
|
||||
@@ -240,6 +240,7 @@ Devise.setup do |config|
|
||||
# up on your models and hooks.
|
||||
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
||||
config.omniauth :twitter, Rails.application.secrets.twitter_key, Rails.application.secrets.twitter_secret
|
||||
config.omniauth :facebook, Rails.application.secrets.facebook_key, Rails.application.secrets.facebook_secret
|
||||
|
||||
# ==> Warden configuration
|
||||
# If you want to use other strategies, that are not supported by Devise, or
|
||||
|
||||
@@ -153,3 +153,5 @@ en:
|
||||
title: Add Email
|
||||
twitter:
|
||||
sign_in: Sign in with Twitter
|
||||
facebook:
|
||||
sign_in: Sign in with Facebook
|
||||
|
||||
@@ -152,4 +152,6 @@ es:
|
||||
finish_signup:
|
||||
title: Añade tu email
|
||||
twitter:
|
||||
sign_in: Inicia sessión con Twitter
|
||||
sign_in: Entra con Twitter
|
||||
facebook:
|
||||
sign_in: Entra con Facebook
|
||||
|
||||
@@ -16,16 +16,22 @@ development:
|
||||
secret_key_base: 56792feef405a59b18ea7db57b4777e855103882b926413d4afdfb8c0ea8aa86ea6649da4e729c5f5ae324c0ab9338f789174cf48c544173bc18fdc3b14262e4
|
||||
twitter_key: AAAA
|
||||
twitter_secret: BBBB
|
||||
facebook_key: AAAA
|
||||
facebook_secret: BBBB
|
||||
<<: *default
|
||||
|
||||
test:
|
||||
secret_key_base: 4d5adf961ddd27aef19622d6c0b3234d555f9ee003f022b1f829c92bbe33aaee907be7feb67bd54c14a1a32512fa968565ad405971fbc41bd0797af73c26a796
|
||||
twitter_key: AAAA
|
||||
twitter_secret: BBBB
|
||||
facebook_key: AAAA
|
||||
facebook_secret: BBBB
|
||||
<<: *default
|
||||
|
||||
production:
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
twitter_key: <%= ENV["TWITTER_KEY"] %>
|
||||
twitter_secret: <%= ENV["TWITTER_SECRET"] %>
|
||||
facebook_key: <%= ENV["FACEBOOK_KEY"] %>
|
||||
facebook_secret: <%= ENV["FACEBOOK_SECRET"] %>
|
||||
<<: *default
|
||||
|
||||
Reference in New Issue
Block a user