Implements sign up during registration. Solves most of #215

This commit is contained in:
Henne Vogelsang 2015-03-12 23:53:57 +01:00
parent 511007138a
commit e8ab94e1c7
12 changed files with 101 additions and 36 deletions

View file

@ -28,7 +28,8 @@ module Users
openid.save!
sign_in user
redirect_to root_path, notice: user.email + " signed in successfully with #{provider}"
flash[:notice] = "#{user.email} signed in successfully with #{provider}"
redirect_to request.env['omniauth.origin'] || root_path
rescue => e
flash[:error] = e.message
redirect_back_or_to new_user_registration_path