Tag: devise

How much bit encryption devise gem using for password?

I am working with devise gem for authentication and i know that its using bcrypt. I want to ask that how much bit encryption it is using for encrypting the password.As the bcrypt documantation is telling its consists of $version$iteraion$salt(128 bit encrypted)+hash .I want to ask can we consider devise alternative for 256 bit encryption.

Disabling validations when reseting passwords in Devise/Warden

I have a user model as follows: class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :invitable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable, :omniauthable validates_presence_of :nickname, :unless => :skip_nickname_requirement end I have a number of user records in the database with a nil nickname – those individuals were imported from another system and I don’t actually have their […]

How to compare passwords in Java hashed by devise gem ruby on rails

I am working on a task of authenticating users from mysql db. The user passwords are hashed by devise gem framework for Ruby on Rails. Docs says it is also using BCrypt to hash the passwords. The problem with jBcrypt is that BCrypt.checkpw(“Google123”, “$2a$10$Qj.7VHa8tJcSFAU9eR1o8eCiXzFSkQPQxpODL971xKiDFbYjdaWyS”); // not working nor BCrypt.checkpw(“test123test”, “$2a$10$vGeVVu.E0XGjlNEa0xMCK.R0SEH0aFuyJpefrq01Axz6WSbHApPEu”); // is working. It always […]

Rails Devise Help

Can someone give me an example of how to do something like this. I have a user setup with devise, according to the way in this tutorial https://github.com/fortuity/rails3-subdomain-devise/wiki/Tutorial-%28Walkthrough%29 (I skipped the stuff related to subdomain) now say if I wanted to have a user make many tweets, so a user and a user alone can […]

`method_missing': undefined local variable or method `authentication_keys' error when installing devise

I’m trying to get Devise up and running. I’m using devise 1.0.10 and rails 2.3.8, on an otherwise pretty clean hostingrails install. When I run ruby script/generate devise_install I get the following error message. Has anyone seen this before. Any ideas how to proceed with the install? I searched around and hit a wall. Thanks, […]

Devise, flash message when require_no_authentication + redirect

Could you tell me whats the best practice to include flash messages f.e. “You must be logged out to view the requested site”, when the require_no_authentication-filter is set and the user accesses a site, which becomes filtered. The flash message should appear in every controller where i call the before filter, not only in the […]

Devise not showing errors on user creation

I’ve run into a situation where I’m trying to create my own user outside of the flow of Devise because I need to modify the user model right after creation. Here’s the relevant actions from the controller: class HomeController < ApplicationController def resource @user || User.new end helper_method :resource def create_user @user = User.new email: […]

How to Show Error Messages Next to Field

I have a form with input fields/labels etc. How do I get the error message to show up next to the field? instead of clumped together at the top? I am using devise, rails 3 I have this at the top of my form: = form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| – […]

How social_stream register new user works (using devise gem)?

I’m trying social_stream gem (https://github.com/ging/social_stream). It uses devise gem for user registration. When I register a new user on social_stream, it creates new records in several tables. I checked the code in social stream, the registration method is not overrided. So I’m totally lost. I can’t find how new records are inserted in the other […]

ActiveRecord::StatementInvalid in AuthenticationsController#create

I’ve almost got Omniauth w/ twitter working, however when it attempts to re-direct me to my app after validating twitter credntials I get the following long-winded error: ActiveRecord::StatementInvalid in AuthenticationsController#create SQLite3::ConstraintException: constraint failed: INSERT INTO “users” (“created_at”, “current_sign_in_at”, “current_sign_in_ip”, “email”, “encrypted_password”, “last_sign_in_at”, “last_sign_in_ip”, “password_salt”, “remember_created_at”, “remember_token”, “reset_password_token”, “sign_in_count”, “updated_at”) VALUES (?, ?, ?, ?, ?, […]

Ruby is the best programming language in the world - Ruby on Rails.