how to configure remember_me in devise? - ruby-on-rails

i m very new in web development...
please tell me whats the functionality of remember me
I am using Devise gem for user authentication
and also tell me when i checked remember me option what effect has been taken....
and how to configure remember me option using devise authentication

Related

Devise + Patreon OAuth in Ruby on Rails

I have implemented the devise+patreon gem in my Rails application without issues. Now, devise requires an email/password by default when creating a User, but Patreon just uses the oauth integration.
I am wondering, what is the proper strategy to use so that I can migrate the Patreon Oauth users as Devise users, without having to set dummy passwords/emails to allow for validation to go through. I still want to eventually allow users to register via Devise natively, as well as through Patreon.
Is there maybe a known strategy/gem/addition for devise that I may have missed that can easily achieve that?
You can retrieve the user email and a lot of other infos (see here) about the user in the login call to patreon's services, but password will remain unknown, you can't just copy & paste a User.

Is this the correct way for only allowing logins via Devise + Omniauth in Rails 4?

I wanted to allow users to signup + login to a Rails app via omniauth only, no email / password sign up / login should be allowed So I looked at this answer, but that didn't work. So I ended up generating customized views for registrations and sessions and commenting out email/password fields in the login + signup forms.
Then in config/initializers/devise.rb I set:
config.params_authenticatable = false
Is this the best way to do it?
I believe there isn't a very "clean" way to do this, because Devise is a very complete solution.
Please take a look here: Using only omniauth (twitter) sign-in with Devise, Rails 3, Omniauth
IMO, if you need just oauth authentication, maybe devise is too much for this. This Railscast may help you as well: Simple OmniAuth

LDAP Authentication with Refinery CMS

I'm attempting to use devise_ldap_authenticatable with Refinery CMS. I've overriden Refinery's user model and changed its call to devise, and added in a devise initializer to configure it.
The path to my LDAP config is correct in the initizlier, but I don't think it's being utilized. I get a Sorry, your login or password was incorrect. error whether the config is there or not.
I'm not sure what else do at this point. I have a simple devise app with devise_ldap_authenticatable that I'm able to authenticate with. I just can't seem to get it work with the Refinery app.

Ruby on rails action filters

In my application I have at this point a authentication function through oauth, but before of that I would like to have a login page, so I want to use Devise to create that. The problem that I am facing is that bought Device and my authentication method require a before_filter, and both methods redirect to a page, and because of that I get an error saying that I have to redirects. How can I fix this problem?
Thank you
I don't know explicitly what you are doing and what are your actual requirements but as far as I know you don not need before filter. you need to provide both options for login, authentication with devise and Omniauth.
I am referring you to some links consult it.
Mandatory:
http://www.samionrails.blogspot.com/2013/08/google-omni-auth-with-devise-tutorial.html
Optional:
https://github.com/intridea/omniauth/wiki/Managing-Multiple-Providers
http://www.samionrails.blogspot.com/2013/08/authenticate-user-using-omniauth.html

Can't login using devise, migrating from restful_authentication

I already migrating from restful_authentification to devise.
I follow every steps. I succeed sign up new user, confirm it.
also login with it's user. Everything is going right.
Until I found a bugs. That some of current user who already able to login with restful_authentification,
cannot login. It returns "Invalid username and password".
It is possible the reason is coursed from different password encryption system between restful_authentification and devise?
Or Devise didn't allow some characters on password?
Please help me? Its already 2 days find ways to resolve the issue
Thanks
Did you configure Devise to use the :restful_authentication_sha1 encryptor, the correct pepper and stretches? See https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restful_authentication-to-Devise
I do not know restful_authentication, but i think you will have to reset the passwords of all the users that existed before. It is safe to assume that devise uses a different algorithm to encode the password.
When resetting the password from the console, you need to specify the :password and the :password_confirmation, otherwise it will not work.

Resources