Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

luisahsiao's Profile

GitHub User: luisahsiao

Comments by

Avatar

Hi, I would you someone can help me.

Im using devise with Rails 4 and im getting an error in my log file trying to sign in.

Unpermitted parameters: password, remember_me

I have this code in my app controller:

class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.

protect_from_forgery with: :exception
before_filter :configure_permitted_parameters, if: :devise_controller?

protected

def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:email, :password, :password_confirmation, :username) }
end

end

Hope you can help me. Thank you!

Avatar

Hi

I have a problem with devise. Im trying to login on a custom page of my site and this redirected to the devise login page.

Im seeing into my log file and there are a line: Completed 401 Unauthorized in 2ms.

Also, I have this into my controller app file:
before_filter :configure_permitted_parameters, if: :devise_controller?

protected

def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) << :email
devise_parameter_sanitizer.for(:sign_in) << :email
end

My log file shows this:

Started POST "/users/sign_in" for 127.0.0.1 at 2014-01-11 17:39:38 -0500
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"EoIQQ/IFKP4dtaTgb5IPYJulXSIHdT3lTtE4D5viT2o=", "user"=>{"email"=>"myemail@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Completed 401 Unauthorized in 2ms
Processing by Devise::SessionsController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"EoIQQ/IFKP4dtaTgb5IPYJulXSIHdT3lTtE4D5viT2o=", "user"=>{"email"=>"myemail@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Rendered devise/shared/_links.erb (1.0ms)
Rendered devise/sessions/new.html.erb within layouts/application (8.0ms)
Completed 200 OK in 139ms (Views: 25.0ms | ActiveRecord: 0.0ms)

I hope you can help