All Questions
Tagged with authentication ruby-on-rails
2,037
questions
0
votes
0
answers
44
views
Login Issue: Unable to redirect to multiple sub-domain with masquerade
Users cannot maintain their login sessions when switching between different subdomains within the same application.
I have a multi-tenant app. Recently, I successfully installed the devise-masquerade ...
0
votes
0
answers
133
views
Rails API application - JWT authentication with Refresh token
I am trying to implement refresh token route in my existing Rails API application. JWT authentication should work the same way in any programming language or framework but in my case it's Rails.
...
1
vote
0
answers
21
views
Using Masquerade with ruby on rails
I have ROR application on 3 layers. Admin > Centre > Branch
I am using masquerade to switching users.
Admin can switch to Center and then Switch to Branch
Admin can directly switch to Branch
...
0
votes
0
answers
51
views
Losing user authentication when returning from opened application tab
I have an application called Portal with a backend in Ruby on Rails and frontend in Vue.js. This application works as follows: the user authenticates, and on the main page, the applications they have ...
0
votes
1
answer
139
views
facing error in JWT authentication in rails
This is the error I am getting while hitting { http://localhost:3000/users } to create a new user but facing the below issue.
JWT::DecodeError in UsersController#index
Nil JSON web token
Extracted ...
0
votes
0
answers
60
views
Creating user tokens for API access (with Auth0)
I have an existing (Rails) application which we're looking to add an API to. We therefore have an existing user base which is currently managed by Auth0.
With our API we would like users to be able ...
0
votes
1
answer
30
views
Can't able to create a simple login page in Rails
routes.rb
Rails.application.routes.draw do
get '/login' , to: 'sessions#new'
post '/login', to: "sessions#create"
end
sessions_controller.rb
class SessionsController < ...
1
vote
0
answers
98
views
Rails backend and React Frontend. Authentication, user is not persisting after refresh
I have a rails backend and react frontend. Login and logout is working just fine. My problem is when I refresh the page, I am getting logged out. I have session setup in my backend, so I'm not sure ...
1
vote
1
answer
215
views
How to detect a failed login attempt with the Devise gem?
I would like to detect failed login attempts and I want to avoid monkey-patching.
Initially, I thought that I can simply use the Warden before_failure hook:
Warden::Manager.before_failure do |env, ...
0
votes
0
answers
42
views
I try to open users/new but I get routing error
I am a programmer who is just starting out, but I don't know how to fix this error since I don't see any flaws in it
I need help to continue with the project
Routes
Rails.application.routes.draw do
...
0
votes
1
answer
74
views
Rails 6: skip_before_action for non-symbolic use of before_action
I have an Auth module (auth.rb), containing a check_auth function:
module Auth
def check_auth(request)
# perform authN/authZ based on request information
end
end
Since I need the request, my ...
0
votes
1
answer
185
views
authenticating devise without password
if params[:confirm_token] == "true"
user = User.find_by(email: params[:email])
binding.pry
sign_in(user)
# super
end
I need to authenticate user without a password.
...
0
votes
0
answers
93
views
Ruby on Rails Devise Gem Rememberable Set config.remember_for dynamically
I want to set the remember_for duration dynamically for every user. Currently I am setting it like this:
config.remember_for = 1.year
I know there exists Timeoutable which does what I want but the ...
0
votes
0
answers
35
views
How add devise link(google_auth button) on main page
I created auth with devise gem and all works good but i want add google-auth button on main page how should i do it?
I tried just adding it to the main page, but it uses the devise private method so i ...
0
votes
1
answer
39
views
Rails / Devise - Separate authentication for each room
I am writing an application that holds multiple "rooms" for users to join. Each room's user session should be independent from each other.
For example, a user should be able to visit /room/1 ...