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
# .gitignore for Grails 1.2 and 1.3 | |
# web application files | |
/web-app/WEB-INF | |
# IDE support files | |
/.classpath | |
/.launch | |
/.project | |
/.settings |
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 OmniauthCallbacksController < Devise::OmniauthCallbacksController | |
def all | |
user = User.from_omniauth(request.env["omniauth.auth"]) | |
if user.persisted? | |
sign_in_and_redirect @user, :event => :authentication | |
else | |
session["devise.user_attributes"] = user.attributes | |
redirect_to new_user_registration_path(@user) | |
end |