Giter Site home page Giter Site logo

devise_couch's People

Contributors

jm81 avatar shenoudab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

devise_couch's Issues

Could not sign in and save user in session

Dears,

kindly, after the user signin successfully he is redirecting back to the sign in page.
seems that the logged in user not saved in the session as logged in user.

and i got that Message "Could not sign in user" from the failure_app.rb

please, check and review

forgotten password not working

Thanks for the latest update it helped a lot.

I've come across another issue, this time with the forgotten password functionality.

I believe that it has something to do with the latest change to the orm_adapter. But I am still getting my head around how things are tied together.


/Users/baphled/.rvm/gems/ruby-1.9.2-head@cvme/bundler/gems/orm_adapter-dcf9cd38b4fc/lib/orm_adapter/adapters/couchrest_model.rb:43:in `find_first'
devise (1.2.rc) lib/devise/models/authenticatable.rb:120:in `find_or_initialize_with_errors'
devise (1.2.rc) lib/devise/models/recoverable.rb:60:in `send_reset_password_instructions'
devise (1.2.rc) app/controllers/devise/passwords_controller.rb:13:in `create'

Any help would be much appreciated.

undefined local variable or method `authentication_keys'

Repro

Building an app from scratch. After running

rails generate devise:install
rails generate couchrest_model:devise User

Running rake routes throws:

undefined local variable or method `authentication_keys' for User:Class

More Info

Base User model of:

class User < CouchRest::Model::Base
  # Include default devise modules. Others available are:
  # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable

end

config/initializer/devise.rb contains (shortened):

Devise.setup do |config|

  require 'devise/orm/couchrest_model'

end

config/application.rb contains (shortened):

require File.expand_path('../boot', __FILE__)

# require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"
require "couchrest_model"

end

Devise related gems installed:

  • couchrest (1.1.2 239e6c9)
  • couchrest_model (1.1.2 819ddb7)
  • devise (2.0.0.rc f712d07)
  • devise_couch (1.0.0.beta2 4fc35f7)
  • orm_adapter (0.0.3 dcf9cd3)

Full rake error at:
https://gist.github.com/1532865

undefined method `to_adapter' for User:Class

If a user attempts to edit their profile they will get this error.

To fix this I had to do something like this, which feels like a cludge:

class Adapter
  def get! identifier
    User.get(identifier)
  end
end

in my User class:

def self.to_adapter
  Adapter.new
end

Is there a better way / something I am missing?

Cannot create Devise Model

When running "rails generate couchrest_model:devise User" I get a "no such file to load -- devise/orm/" error.

I guess I have to change the corresponding entry in the initializer but I don't understand this part of the instructions:
"Make sure to specify either couchrest_model (ActiveModel::Validations) as the orm in the configuration file."
--> What do I have to specify in the initializer file?

Can only login as first user (in alphabetical order)

I've just switched from MongoDB to CouchDB using CouchRestModel. I've been trying to fix my login for 12 hours now and so far no success. I've looked at all the closed tickets and searched the internet for answers but I haven't found anything that helps.

If I login as the first user in alphabetical order, IE "andy", it works fine. But if I login as another user, IE "phill", it does not allow me to login. I see the redirect to my dashboard, as it should, then it redirects back to login.

I have confirmed that the find_for_authentication is returning the correct user, but something after that is causing it to fail. Maybe something in authenticate_user!.

So now I'm asking for help as I can't figure it out.

Thanks.

rememberable, preventing login with "You can't search with more than one condition yet =("

Don't know if this is a bug or user error.

If a user checks "remember me" it saves the remember token, but then for some reason on a new session tries to supply two keys (the user id and the token) directly to couch, and does not try to access the remember_token view. This causes the following output:

You can't search with more than one condition yet =(
Extracted source (around line #10):

7: #beta
8: #logo= link_to ' '.html_safe, :root
9: #signin
10: - if user_signed_in?
11: #userActionsLoggedin.linkmenus
12: %span Welcome, #{current_user.email}
13: %span.menuLink= link_to("Profile", :action => 'show', :controller => 'users', :id => current_user.id)
Rails.root: /Users/swells/TestHub/TestHub/testcloud-1.0.0/testcloud/testcloud

Application Trace | Framework Trace | Full Trace
/Users/swells/.rvm/gems/ruby-1.9.2-p180/bundler/gems/devise_couch-4fc35f731fbf/lib/devise/orm/couchrest_model/schema.rb:20:in find' devise (1.1.5) lib/devise/models/rememberable.rb:108:inserialize_from_cookie'
devise (1.1.5) lib/devise/strategies/rememberable.rb:19:in authenticate!' warden (1.0.3) lib/warden/strategies/base.rb:53:in_run!'
warden (1.0.3) lib/warden/proxy.rb:303:in block in _run_strategies_for' warden (1.0.3) lib/warden/proxy.rb:298:ineach'
warden (1.0.3) lib/warden/proxy.rb:298:in _run_strategies_for' warden (1.0.3) lib/warden/proxy.rb:271:in_perform_authentication'
warden (1.0.3) lib/warden/proxy.rb:90:in authenticate' warden (1.0.3) lib/warden/proxy.rb:100:inauthenticate?'
devise (1.1.5) lib/devise/controllers/helpers.rb:216:in user_signed_in?' actionpack (3.0.1) lib/abstract_controller/helpers.rb:55:inuser_signed_in?'
app/views/front_page/index.haml:10:in `block in _app_views_front_page_index_haml__637491628106427591_2190825140__4307954043896241644'

Find devise user not working

I set up devise and devise_couch and could successfully create a user vía devise.
But once I want to sign in or send reset password instructions the user can not be found.

A look to the CouchDB log shows that there is just a PUT request to re-create the User's database - do I have to explicitly create devise views for the Devise (in my case User) model?

rememberable not working

Enable the rememberable, when sign_in with the rememberable token, seems the code run into a infinite loop getting the view/all from CouchDB.

below is what CouchDB log show:

1> [info] [<0.28082.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%226PgI969vCxewiTPV0jnzoTVUIN61d8IqcUjy2GycVv4BieA9o7LFvV37zTIz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28084.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%22eLH24SRRkdRbMxExFvXMnBxx7WobsiY8RRBnjdK8TxiXLswSsAxw4vlfercz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28085.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%225jwDs6ZBxUyQIS024LvrdCixzbX8E6tdTybxA89o1stx77c56n8s51H2ihYz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28086.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%222jVrGmNnIMQxA6cyVuvPSPbQigRCb1X1l43ULHLYkFyyQYNWIEbAWdCuBkIz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28087.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%22Qx8mGCKBujDwLYwhl3nAnCvdCBDgLdOExAqhyA4FcANFl7tj9ctrDA9nf9kz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28088.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%22UOnzZVKSr3fo42mevyePNw56HM1nnL8zI3V4s1Gv648vVy5XfCGKxg6mxYMz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28089.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%222BdWU3yHR4rQHlCBluyrU3g2PqjCKx054t63Iwf4GJ1DjglGIHd5p0l3ZaEz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28090.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%22mlq5SvZ2DrsCEecn5cTg4eeOJ3OmXV52oxXypPght1ACIuGBqveXsy1OneMz%22%7D&limit=1&include_docs=true 200
1> [info] [<0.28091.1>] 127.0.0.1 - - 'GET' /devise_couch/_design/User/_view/all?conditions=%7B%3Aremember_token%3D%3E%22l4SztRmykWTaVNk8uwJX3WkzLBWVqfhV5zEofMgLxkejsKrrRULWQP8dH7Az%22%7D&limit=1&include_docs=true 200

token_authenticatable not working with devise 1.2.rc

its generating this query to couchdb:

GET /users/_design/User/_view/all?conditions=%7B%3Aauthentication_token%3D%3E%22Seaf8VnDHAv2jmLGYEuSPFoxSBF0bI5sqYxMG4KnyqeOHIaLoNAwBPDZOCwz%22%7D&limit=1&include_docs=true

it should be generating this query:

GET /users/_design/User/_view/by_authentication_token?key=%22xyzfasdasd%22

Any advice? I may investigate and append a patch if I can.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.