This commit adds a callback route to handle omniauth failure and removes a few unneccessary entries in en.yml

This commit is contained in:
Jesse Pollak
2013-02-14 11:11:13 -08:00
parent 9eb5c2a66a
commit ad5a5b4866
6 changed files with 84 additions and 54 deletions

View File

@ -22,6 +22,11 @@ class Users::OmniauthCallbacksController < ApplicationController
end
end
def failure
flash[:error] = I18n.t("login.omniauth_error", strategy: params[:strategy].titleize)
render :layout => 'no_js'
end
def create_or_sign_on_user_using_twitter(auth_token)
data = auth_token[:info]
@ -62,7 +67,7 @@ class Users::OmniauthCallbacksController < ApplicationController
email = data[:email]
name = data["name"]
fb_uid = auth_token["uid"]
username = User.suggest_username(name)