Created
January 30, 2012 17:13
-
-
Save foca/1705495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Store::OmniauthCallbacksController < Devise::OmniauthCallbacksController | |
# GET /store/auth/:provider/callback | |
def success | |
auth_hash = request.env.fetch("omniauth.auth") | |
user = User::Authorization.authorize(auth_hash) | |
sign_in_and_redirect user | |
end | |
# This is stupid, devise | |
alias_method :twitter, :success | |
alias_method :facebook, :success | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment