Skip to content

Instantly share code, notes, and snippets.

View Vinay50's full-sized avatar

Vieenay Siingh Vinay50

View GitHub Profile
# .gitignore for Grails 1.2 and 1.3
# web application files
/web-app/WEB-INF
# IDE support files
/.classpath
/.launch
/.project
/.settings
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