Questions tagged [clearance]

Clearance is a Ruby gem for authenticating users with email and password in Rails apps.

Clearance is a Ruby gem for authenticating users with email and password in Rails apps. https://github.com/thoughtbot/clearance

112 questions
2
votes
2 answers

Rails 5 API app returning white screen with Devise sign_in page

I am working on a Rails 5 API only app using JWT tokens. I'd like to use Rails Admin for internal processes and would like to configure Devise (or Clearance) for auth for staff members instead of integrating JWT tokens with Rails Admin…
srt32
  • 1,260
  • 1
  • 14
  • 27
2
votes
0 answers

Clearance gem not always rendering the correct layouts

I am currently using the Clearance gem by thoughtbot have noticed when trying to get the different controllers to render a different layout that not always does it render the correct layout, it reverts back to my standard layout. I am currently…
Boss Nass
  • 3,384
  • 9
  • 48
  • 90
2
votes
1 answer

Extending Clearance gem controllers

I am trying to extend clearances controllers to pass through some other form elements I have currently done the following but it doesn't appear to be working and is returning ActiveModel::ForbiddenAttributesError class UsersController <…
Boss Nass
  • 3,384
  • 9
  • 48
  • 90
2
votes
1 answer

Using Clearance with API

I am currently using Clearance from Throughbot for my authentication. I am needing to add an API to my product and can't seem to find docs about using Clearance with an API. Is there a certain Header I can set that Clearance will check automatically…
CWitty
  • 4,488
  • 3
  • 23
  • 40
2
votes
1 answer

Using fixtures with Clearance in Rails 4 for unit test user model

I'm using Clearance for authentication in my Rails application. I'm using the default Minitest stack. Clearance by default only use email and password fields so i add a name field and now i want to unit test the model to do some checks. This is my…
Javier Cadiz
  • 12,326
  • 11
  • 55
  • 76
2
votes
1 answer

"uninitialized constant" routing error using Clearance

I'm using Clearance for authentication and am attempting to set the root depending on whether the user is logged in or not. Logging in, logging out and creating/deleting users works fine. I'm following this article from Thoughtbot where I've added a…
2
votes
4 answers

Clearance additional strong_parameters in RoR4

I am using the clearance gem, which is basically an authentication by e-mail. Now I want to keep the log in via email, but want to add a 'name' field into the registration form for the user. User.rb class User < ActiveRecord::Base include…
Miiller
  • 1,063
  • 1
  • 10
  • 29
2
votes
1 answer

Clearance gem queries for users too many times

I am using clearance gem for authentication purpose and it is working very much fine. But, the problem with it I found is, it slows down the application. By taking a closer look at this, I found that it fetches user for each and every…
vikram
  • 423
  • 4
  • 19
1
vote
2 answers

Add custom column to User Model using rails Clearance gem

I use the Clearance gem to add authentification to my website. The standard User model looks like this: class User < ActiveRecord::Base include Clearance::User end Now i want to add more properties to the User Model. I created this…
Etienne678
  • 444
  • 4
  • 12
1
vote
1 answer

About overriding Devise or Clearance controllers

Since authentication gems such as Devise or Clearance uses their own built in controllers, I have a few questions when overriding them. Everytime I've tried to override it, something seems to go wrong and I don't know what it is exactly that caused…
cdotfeli
  • 309
  • 1
  • 4
  • 14
1
vote
1 answer

Routing error: wrong constant name Clearance/sessionsController

I've upgraded a rails3 project from clearance 0.8.8 to the latest (0.12.0). followed the wiki instructions to do that. I'm using an 'admin' prefix to most of the authenticated pages. However, eventhough the routes are all correct, I get a routing…
cnikolaou
  • 3,782
  • 4
  • 25
  • 32
1
vote
1 answer

How do I set the port correctly in email links during a system test?

I'm writing a System test to confirm the entire sign up flow is working in a Rails 7 app (with the Clearance gem and an email confirmation SignInGuard). The test is working fine right up until I "click" the confirm link in the email (after parsing…
Matthew
  • 1,300
  • 12
  • 30
1
vote
1 answer

Thoughtbot Clearance -> Why do I always get signed_out?

I am using Clearance gem. It's "half" working. I can do all basic actions (sign up, sign in, :authorize). But, when I do a POST action to a controller, it just signs me out ... Here what's in the log : Started POST "/monkeys" for 127.0.0.1 at Fri…
Dominic Goulet
  • 7,983
  • 7
  • 28
  • 56
1
vote
0 answers

Extending Rails ThoughtBot/Clearance gem for password rotation

I love the ThoughtBot Clearance gem (https://github.com/thoughtbot/clearance) for Rails authentication. But I'd like to expand my knowledge base in what/how I can make it more-better :) I've used Devise (https://github.com/heartcombo/devise) in past…
1
vote
1 answer

How to set Session length for a User in Clearance?

How do I kill the session cookie for a user that closes their browser and or a day passes in Clearance? I do see the following config vars, but I believe the cookie expiration is for the general cookies, not for the session…
Carson Cole
  • 4,183
  • 6
  • 25
  • 35