15,007 questions
3
votes
1
answer
109
views
Rails8/Devise custom action found in routes, but 404 when called
I'm extending the Devise invitations controller to lookup the email of the invitee to pre-populate the registration form. I'm getting an error:
#<AbstractController::ActionNotFound: "Could not ...
0
votes
0
answers
57
views
setting up an ActionCable connection using Devise
It is somewhat unclear to me given the rails guide instructions how to define the verified_user. The documentation suggests:
if verified_user = User.find_by(id: cookies.encrypted[:user_id])
if ...
0
votes
1
answer
82
views
Rails API issue with devise routes
I am creating an api in rails and I am implementing the authentication with devise gem. Right now I am creating a custom verify endpoint but I am getting the following error:
Unknown action
Could not ...
0
votes
0
answers
85
views
Rails API: Devise/Warden intercepts API requests causing "No Failure App provided" error
I’m working on a Rails 8 API application where I have separated API routes from my admin panel:
namespace :api do
get 'test', to: 'clerk_test#index'
end
devise_for :admin_users, ActiveAdmin::Devise....
0
votes
1
answer
60
views
How do I scope devise user authentication to a group/organization
I am building an app using Ruby on Rails and devise for user authentication. I have a top level user that can create groups and then users can create accounts inside of the group I already have this ...
0
votes
1
answer
67
views
Nested user model scoped inside of a module and devise routes
I'm trying to add a second user model with devise my original model was User and I was able to add the routes by doing
devise_for :users
Now I have a nested situation where there is a nested user ...
1
vote
1
answer
75
views
Devise Token Auth confirmation link returns 500 error in production (AWS Fargate + Nginx + Rails)
I'm building a single-page application using Devise and Devise Token Auth for authentication. Everything works fine in development, but in production, clicking the email confirmation link results in a ...
1
vote
1
answer
56
views
Error when logging out user session with Ruby API
I'm working on user authentication with Devise, and decided to use session-based authentication for testing my API user login and logout functionality. At the moment the login works, but the logout ...
0
votes
0
answers
67
views
After Rails update from 6 to 7, Devise flash messages are not available anymore (Turbolinks disabled)
My Rails app uses Devise (4.9.4) and CanCanCan (3.6.1). I just updated it to version Rails version 7. Since then, the flash messages do not appear anymore when registering as a new user.
I have found ...
0
votes
0
answers
45
views
non-standard way of logging in user with devise (including confirmable)
An application has the motive to register a user via a distinct process that diverges from the one defined by default by devise (invoking the registrations_controller).
The process would be to
create ...
0
votes
1
answer
35
views
Redirect takes desktop viewport after successful google oauth login
I am using Devise for google oauth. When I sign in via mobile on web browser, after successful authentication I get redirected with desktop view.
class Reactors::OmniauthCallbacksController < ...
-1
votes
1
answer
426
views
Recaptcha "ERROR for site owner: Invalid key type"
I have a problem is a rails app using the recaptcha gem which uses devise for authentication.
What I did
I am trying to put Google recaptcha on the "password forgotten" screen users/password/...
1
vote
1
answer
85
views
devise and language by multiple domain
I'm trying to use multi language by domain, for example I have domain.fi.local for language Finnish and domain.es.local for language Spanish and on every of them you can switch to English and I have ...
0
votes
1
answer
52
views
Devise send_reset_password_instructions invalid token in Active Admin Rails
I have this problem in ActiveAdmin. When I try to reset a user's password with devise send_reset_password_instructions.
member_action :reset_password, method: :get do
resource....
0
votes
1
answer
36
views
Cucumber Devise login via remote Selenium chromium not working
Context: I set up a new system using rails-new into a devcontainer. So the dev environment is running inside docker. I'm using a dockerised Selenium Chromium to run my tests. I'm using Devise for ...
1
vote
0
answers
115
views
Using omniauth for SSO and offline_access with Devise in Rails 8
I have a Rails 8 application where I'm currently using Omniauth + Devise to handle SSO with Microsoft.
I also want to allow a logged-in user to perform a separate authorization of a Microsoft app ...
1
vote
0
answers
114
views
Rails 7 with Device Token Auth (1.2.5) Returns Completed 401 Unauthorized after Successfully Login
I'm currently using Rails 7 and devise_token_auth (1.2.5). We use all the default settings from devise_token_auth and it's been working perfectly.
Here is our session controller code:
class Api::V1::...
0
votes
0
answers
75
views
(Rails, devise) Session not persisting in Firefox ONLY?
So I have a truly bizarre problem and I appreciate any help with it.
I have a Rails app (7.0.8.4) that uses devise (4.9.3) to manage session handling. Typically, when a new account is created, the ...
0
votes
0
answers
81
views
Adding custom parameters to devise registration - Insert is not complete
I'm trying to add some customs parameters to a devise class. I configured registrations_controller with the method:
def configure_sign_up_params
devise_parameter_sanitizer.permit(:sign_up, keys: ...
1
vote
0
answers
61
views
Devise gem error in test environment: serialize_from_session gives error "wrong number of arguments (given 10, expected 2)"
I just updated my app to rails 8 with the newest version of Devise and hotwire turbo. When running tests with Capybara/Rspec I'm seeing certain form submissions fail with a 500 error from inside of ...
-3
votes
1
answer
124
views
Rails Devise Strong Parameters not building Nested Association
I did generated devise controllers and views and defined both User and Account models like the following:
User
class User < ApplicationRecord
# Include default devise modules. Others available ...
1
vote
1
answer
276
views
run time error while running tests in rails
versions:
> ruby -v
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin24]
> rails -v
Rails 8.0.0.1
user.rb model:
class User < ApplicationRecord
devise :database_authenticatable, :...
0
votes
0
answers
47
views
RSpec: login_as not working after switching to shallow nesting
I'm switching to shallow nesting of Assets (belonging to Entity), and I'm rewriting request specs.
For the new shallow routes (e.g. '/assets/1', which was '/entities/1/assets/1'), login_as fails. It ...
0
votes
0
answers
72
views
Rspec request test with omniauth doesn't call destroy method when sign out is called
I have a rails 6.1.7 project with omniauth + devise and a custom openid connect server that I'm connecting to.
I'm trying to write a rspec request test for the log out feature with some logic in the ...
0
votes
0
answers
80
views
Devise and authenticity_token problem in production
I have trouble making Devise work in production. When I try to register/login, the following error message appears in the logs:
INFO -- : [] Started POST "/users" for x.x.x.x at 2024-10-25 ...
0
votes
1
answer
41
views
Form_for nested profile using Devise on Rails 7 not displaying field
Trying to add a basic Profile username attribute to the devise new form but the username field is not rendering on screen.
The devise registrations/new.html.haml
= form_for(resource, as: resource_name,...
0
votes
0
answers
155
views
401 when authenticating swift client with rails API (using Devise)
I have a Rails API using Devise JWT for authentication.
When trying to login using Postman it works like a charm:
But when I call from my Swift app, I have a 401 Unauthorized with invalid credentials....
-1
votes
2
answers
113
views
401 Unauthorized with Devise basic auth
I made a Rails install 7.2.1, installed Devise basic. I set in my applications controller:
def after_sign_in_path_for(current_user)
# Assuming 'Dashboard' is a model and you have a show action
...
0
votes
1
answer
88
views
No route matches [GET] "/users/sign_out" i can delete my account but not log out
Here is my error:
No route matches [GET] "/users/sign_out"
and this is all routes :
Prefix Verb URI Pattern ...
0
votes
1
answer
149
views
Rails 7 devise gem can't login with valid credentials after some days
Rails 7
Devise 4.9.4 (with bcrypt (~> 3.0))
User can't login error raised "Invalid Email or password."
User reset password and can login with new password after some days he/she can't ...
0
votes
0
answers
74
views
ActionController::InvalidAuthenticityToken Error with domain: ':all' in Rails Session Store
I’m encountering an ActionController::InvalidAuthenticityToken error in my Rails application when using the session store configuration with domain: ':all'. The issue appears specifically when setting ...
0
votes
1
answer
82
views
Do something after succesful login in Rails devise
I have a Rails app and use devise for registration and sign-up of users. Now I want to store the date of the last successful login on the user.
Basically I thought about overwriting the create method ...
0
votes
1
answer
92
views
Devise unable to find_for_authentication
Having upgraded Rails from 7.1.4 -> 7.2.1 users can't log in any more. Strangely, this only appears to affect development mode. The problem appears to be caused when the sessions controller calls:
...
0
votes
1
answer
52
views
Rails Many-to-Many Association: Unique Email Per Organization Is Being Enforced but same email that belongs to different org is not enforded
Here I have created many to many association between users and organizations through memberships and It is working fine but What I want is I want the same user(i.e user with same email) to be inserted ...
0
votes
1
answer
60
views
errbit container running http, nginx reverse proxy redirecting https to http, cannot login
I have a very simple setup using an Errbit container running on http and an nginx reverse proxy that takes https and redirects it to the Errbit container using http (config file see below). I can not ...
0
votes
1
answer
39
views
Rails Devise LDAP - Signed Connection Question
I have a rails app that has been using devise / devise_ldap_authenticatable for years to authenticate to AD. The logins started failing and I am seeing LDAP error 8: Stronger auth needed. in the logs.
...
1
vote
1
answer
47
views
Checking if authentication in required on a page using Rails and Devise
I have a Rails 6.1 application that uses Devise for authentication.
In my application_controller.rb I by default require authentication on all pages:
class ApplicationController < ActionController::...
0
votes
1
answer
81
views
Short session duration in Rails 7 PWA
My Rails 7 PWA is logging me out:
Any time I force close the PWA, and
After just a few hours even if the PWA is left running in the background
This only happens in the installed PWA on a mobile ...
1
vote
0
answers
121
views
Trouble Configuring SAML Authentication in Rails with Devise: Signature Verification Failure
I am currently integrating SAML authentication into a Ruby on Rails application using the Devise SAML Authenticatable gem, and I've encountered a significant challenge regarding the signature ...
0
votes
0
answers
129
views
devise-security gem and password_archivable issues
I have an issue trying to add security-gem features to an app that already has device for login and password management.
The objective is to be able to have the password expire and to deny the ...
0
votes
1
answer
128
views
Rails 7 devise lockable + paranoid not displaying lock message
In my Rails 7 Ruby 3.2.1 app, I'm using Devise and devise-security gems with the paranoid settings enabled (config.paranoid = true). Since a pentest report arrived on my table, I now need to lock a ...
-3
votes
1
answer
65
views
DEVISE NoMethodError in Admin::Shop#index (rails 7)
my apologies for all the pictures
I am following a tutorial by Conner Jensen(youtube) on creating an ecommerce platform using rails 7. I have run into a couple of problems whilst following this ...
1
vote
1
answer
88
views
Devise Tiemout - Are cookies the only way of passing params after a timeout?
I can not believe it is not possible to pass parameters to Devise's timeout method... so I hope someone can enlighten me.
I have a Rails application with two mountable engines: A and B. Both engines ...
2
votes
1
answer
96
views
DEVISE localhost:3000/admins/sign_in link always redirects to localhost:3000 (rails 7)
I am building an app in Ruby on Rails 7 that has Admin and User side. after configuring Devise, all of my Devise routes redirect to "home#index". how can I fix this? I inititially thought it ...
0
votes
1
answer
98
views
Ruby on Rails - Server Memory Spiking and Users getting logged out
We have a fairly typical Ruby on Rails 6.1 app with a Redis cache store which we are also using for our session store. We are using Devise and an single-page app with lots of graphql requests.
...
0
votes
0
answers
286
views
Rails: How to rate limit devise on signup and password reset?
Rate limiting on signup is important to prevent an attacker to create lots of spam accounts in the database and eventually to exhaust database resources or disrupt the flow.
Rate limiting on password ...
0
votes
1
answer
23
views
Blocking the possibility of logging in if the user is not in the database - Rails Devise
I'm using Devise and devise_ldap_authenticatable to allow users to login. I'm using only session controller
class Users::SessionsController < Devise::SessionsController
layout 'landing'
...
0
votes
1
answer
67
views
rails api app with devise gem- always getting 401 error
I have set up a new rails api app and trying to use devise for login, but even with correct email and password getting 401 always
Trying to solve it for a couple of days but no luck
Below are the ...
0
votes
1
answer
222
views
Expo Auth Session with Doorkeeper custom oAuth provider & devise
Using expo-auth-session for authentication in a react native app, the browser will open for you to login and you may notice it doesn't close on login/sign up - you may then try to login again and ...
1
vote
1
answer
52
views
Ruby on Rails 7 devise and ldap login issue
I'm using Devise and devise_ldap_authenticatable gem in my rails app. I want users to be able to log in with their username, not their email address but there is an issue. When I enter my login and ...