Questions tagged [devise-jwt]
32 questions
1
vote
0 answers
Access env['warden'].user from ApplicationCable is nil
So I am trying to implement dervise-jwt in a Rails 5.2 application. My login is working properly, and the tokens are being created. That being said, I want to access that same current_user from my ActionCable. Following some online tutorials, my…

Pro777
- 1,684
- 1
- 18
- 30
0
votes
0 answers
getting error when signing-in after a sign_out: rails 7 devise user authentication for both api and web
I wanted to build a rails-7 app which will work for both API and web. It works fine for web and for API I've used devise-jwt gem. It works perfectly for sign_up, sign_out and sign_in also but after a user signs out once, sign_in doesn't work. It…
0
votes
0 answers
Implementing devise-jwt with Rails 7 web application
I found a lot of tutorials implementing devise and devise-jwt with rails api only application. But I wanted to implement devise-jwt with rails 7 web application. This application has some APIs which needs to be accessed by third party. So I was…

sunsun
- 506
- 3
- 6
0
votes
1 answer
"authenticate_user" returning last created user instead of authenticating in Rails API-only app with Devise and JWT
I am building an API-only app using Rails with Devise and Devise JWT for authentication. I have set the JWT revocation strategy to self and created controllers for Devise sessions and registrations. When I register a user, I am able to obtain an…

MOin
- 31
- 1
- 1
- 8
0
votes
0 answers
Devise-JWT Rails: Logging in returns wrong user's data
I'm using the devise-jwt gem for authenticating my Rails backend and React frontend. Everything was working perfectly with this until I created a second user and tried logging them in. Even though the backend is processing the correct email and…

Smeliott
- 37
- 7
0
votes
0 answers
Rails 7 API/devise-jwt login always retrieves a token for the same user after first login only in production
After creating a user in my application, for example foo@bar.com, and after I log in the first time with said user, the application will keep retrieving a token for foo@bar.com if I login with any other user after that.
User model:
class User <…

Scramel
- 1
0
votes
1 answer
Override Rails Devise Controllers and get routing errors
I'm overriding Devise controllers in Rails like that:
module Api
module V1
module Devise
class RegistrationsController < Devise::RegistrationsController
....
end
end
end
end
And thats my…

fcastillo
- 938
- 1
- 11
- 24
0
votes
0 answers
Customize devise_jwt errors
I am using devise and devise_jwt for token authentication. So when the token is expired it gives me an error
{"errors": "Signature has expired"}
but I want to customize this error to
{"errors": "Need to login again"}
Is this possible to customize…

PalMaxone
- 32
- 8
0
votes
1 answer
What is the meaning of the error for Facebook SSO callback in rails
I am trying to implement facebook sso in a project without any gem. After callback it is throwing the below error.
The API calls
The errors
My code is
Gemfile:
gem 'devise'
gem 'devise_invitable', '~> 2.0.0'
gem 'devise-jwt'
gem…

RABEYA KHATUN MUNA
- 37
- 3
0
votes
0 answers
Is it possible to create new sign_in without logging out already authenticated account? on rails api
I created rails API and used devise and devise-jwt for authentication. I have problem as below
I sign in using api on postman using account "A" and it gives me bearer token
I again sign in using api on postman using account "B" without logging…

setobiralo
- 1
- 1
0
votes
2 answers
Rails 7 API only app requiring session store with Devise
I have a new app that I am trying to setup with devise and devise-jwt. For some reason my authenticate_user! call is causing an error because sessions have been disabled:
{"status":500,"error":"Internal Server…

Jeremy Thomas
- 6,240
- 9
- 47
- 92
0
votes
0 answers
POST method resulting in 401 Axios error rails/react app
This is the first Rails/React app I've built and of course have hit a roadblock. I've been stuck here for a few days without success so hoping to get some help to understand what's going on and move forward.
I have been attempting to perform a POST…

Jacqui
- 21
- 3
0
votes
2 answers
How to pass an additional parameter when the user singing up using devise? even it is not User coulmn
I want to send additional values when the user signs up and do some logic before creating the record using devise and devise-JWT in Rails API,
I used that https://rubydoc.info/github/heartcombo/devise/main/Devise/ParameterSanitizer to permit…

Bishoy Faheem
- 37
- 2
- 9
0
votes
1 answer
Login with devise-jwt authentication?
I cannot figure out how to send a post request to login on devise with devise-jwt
I use devise as web authentication, but want to add an endpoint for api authentication
This is my route
namespace :api do
namespace :v1 do
devise_for…

user18921636
- 1
- 1
0
votes
1 answer
devise-jwt does not check password_confiramtion on sign-up
How to add password_confirmation and force "devise-jwt" to check it with given password?
I prepared Back-end and Front-end according to this:
Devise API Authentication With Vue JS | Ruby on Rails 7 Tutorial
here you can get source code:
github:…

robertbeb
- 1,520
- 1
- 10
- 13