Tagged Questions
13
votes
1answer
5k views
Custom authentication strategy for devise
I need to write a custom authentication strategy for https://github.com/plataformatec/devise but there doesn't seem to be any docs. How's it done?
21
votes
5answers
8k views
Devise logged in root route rails 3
Heyya guys.
So i thought about this coolio idea, if you are logged in then you get some sort of dashboard, else you get an information/login/sign up page.. So how do i do that..
I mostly wants to do ...
31
votes
6answers
17k views
Extending Devise SessionsController to authenticate using JSON
I am trying to build a rails API for an iphone app. Devise works fine for logins through the web interface but I need to be able to create and destroy sessions using REST API and I want to use JSON ...
17
votes
3answers
11k views
Devise API authentication
I am working on a rails web application that also provides JSON based API for mobile devices . mobile clients are expected to first obtain a token with (email/pass), then clients will make ...
15
votes
2answers
3k views
Devise call backs
Does devise have call backs when a user signs in and out?
This is what I came up with:
Warden::Manager.after_authentication do |user,auth,opts|
user.update_attribute(:currently_signed_in, true)
...
17
votes
2answers
5k views
Ruby on rails: Devise, want to add invite code?
I would like to add an invite_code requirement for users to sign up. Ie. in addition to requiring them to specify an email/password combo, I want an additional field :invite_code. This is a temporary ...
25
votes
5answers
19k views
Devise Custom Routes and Login Pages
I'm trying to get Custom Routes working in my Rails application (Ruby 1.9.2 with Rails 3).
This is my config/routes.rb file
match '/dashboard' => 'home#dashboard', :as => 'user_root'
...
2
votes
1answer
835 views
PhoneGap Mobile Rails Authentication (devise? authentication from scratch?)
I have a PhoneGap app with a Rails backend. I'm trying to figure out what the best way is to authenticate a user from the mobile app using json.
I am using devise currently, but I don't have to use ...
4
votes
5answers
6k views
why do i get uninitialized constant Devise name Error when running webrick server?
In my application i have used ruby 1.9.2 and rails 3.0.3 and have also installed Devise gem.The problem begins when i run the Webrick server i get uninitialized constant Devise name Error.
...
6
votes
8answers
2k views
Redirect user after log in only if it's on root_path
I have a root_path on my Rails application that is not user-protected i.e. it's a simple portal homepage, with a login form.
After the users log in, I'd like it to go to dashboard_path.
I've done ...
5
votes
1answer
2k views
How to Stub out Warden/Devise with Rspec in Capybara test
I want to stub out a logged in user (with Devise/Warden) using rspec mocks in a Capybara test suite in my Rails app. This would save a ton of time, and would mean that my test suite can/will be run ...
1
vote
1answer
133 views
Is there a way to return the number of devise users currently logged in?
Is there a way to figure out how many users are actively logged into a rails app using devise?
Rails 3.1
gem 'devise', '~> 1.4'
gem 'dm-devise', '~> 1.5'
with ...
0
votes
2answers
676 views
Allowing users to edit accounts without saving passwords in devise & passing conditions to :reject_if in Ruby
I am working on a ROR app, and I'm stuck when it comes to Devise and password confirmation. I'd like for my users to be able to edit their information (name, location, etc) without having to enter and ...
5
votes
2answers
3k views
http authentication in devise and rails 3
I have an application which uses devise on rails 3. I would like to enable http authentication so that I can authenticate to my web app from an iPhone app. How can I authenticate from my iPhone app to ...
23
votes
1answer
6k views
Rails 3 with Devise for Authentication - How do I manually create a user?
I would like to manually create new Users, without forcing them to verify their email address.
The idea is to allow existing users to automatically add their friends without requiring their ...