Questions tagged [devise-token-auth]

Token-based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth. Use this tag for questions related to Devise Token Auth.

Token-based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth. Use this tag for questions related to Devise Token Auth.

136 questions
0
votes
0 answers

User-based `token_lifespan` instead with Devise

one important step before filing an issue is to share reproducible steps. This is exactly where we're having trouble with; the bug below only happens in production. The issue is once we shorten the token_lifespan from 2 weeks to 30 minutes (or…
Gustavo Matias
  • 3,508
  • 3
  • 27
  • 30
0
votes
0 answers

Token should not be created if a user is already signed in and already has a token

Following is the create action of DeviseTokenAuth Sessions Controller. def create field = (resource_params.keys.map(&:to_sym) & resource_class.authentication_keys).first @resource = nil if field …
Muhammad Ans
  • 157
  • 8
0
votes
1 answer

Devise Auth Token

can anyone explain me what is the following line doing in DeviseAuthToken sign_in(:user, @resource, store: false, bypass: false. what is the function of store: false and bypass: false
Muhammad Ans
  • 157
  • 8
0
votes
0 answers

What is the difference between devise-token-auth and jwt?

What is the detailed differences among them and sharing of informative links or articles would be extremely benificial.
Muhammad Ans
  • 157
  • 8
0
votes
1 answer

Devise Token Auth customised routes for additonal endpoints

I'm trying to setup custom routes for Devise_Token_Auth for additional endpoints for my User model. Here's my default devise_token_auth routes. mount_devise_token_auth_for 'User', at: 'auth' Now, I want to add routes for some endpoints which are…
0
votes
1 answer

How can I refresh all the cookies, token and session after logout calling API using Rails Hotwire

I am working on a project which is done in Rails Hotwire where devise gem has been used for authentication and, in frontend Stimulus.js has been used. Instead of using link_to , I want to write an API with delete method, to refresh like: cookies,…
0
votes
1 answer

Devise does not valdiate email while sign_up

I have a model, User: class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :trackable include DeviseTokenAuth::Concerns::User extend EncryptedField validates…
0
votes
1 answer

Password reset email using Rails devise is not changed

Assumption I am sending an email to reset my password using devise token auth. I was able to send the email, but I am unable to change the email template. I have tried everything but could not solve the problem, so I am asking this question. What we…
0
votes
0 answers

ActionDispatch::Cookies::CookieOverflow occurs when trying to return relevant values using devise token auth

Assumption I'm using devise token auth in Rails, and when I try to return values related to user information created with devise token auth, I get a cookie over capacity error. If I use model name.all the error does not occur. How can I resolve this…
0
votes
0 answers

How to use ruby on rails devise completely passwordless?

In our system, we have a separate solution for authentication, and we do not want to use the devise's password verification functionality. Other than password verification, we want to rely on the devise for users management. Can someone help us to…
Anand Padiya
  • 143
  • 8
0
votes
1 answer

Rails protect_from_forgery has not been defined

I'm new at rails so maybe this is so basic and that's why I couldn't find anything about it. But anyways I stuck at here and I need help. I updated a rails 4 application to rails 6 and when I try to sign_in it throws this error. ArgumentError at…
Kadir Kalkan
  • 248
  • 2
  • 10
0
votes
0 answers

How to show or where to find session/registration controller for devise token auth gem in RAILS?

I want to do something in the session controller when the user is using the sign_in method. Where to find the session sign_in controller for devise token auth gem in rails? Or is it even possible? Thanks in advance.
0
votes
2 answers

How to include user has_many association on sign in response from devise?

hope you guys are doing well, I have this User which has a has_many association with an Address model (User has_many addresses). How can I config devise to return all the user addresses at the sign in? The association already works well, but I cant…
Roger Peixoto
  • 348
  • 2
  • 5
  • 18
0
votes
1 answer

NameError (undefined local variable or method `sign_up_params' for #)

I have this error, it occurs when I try to POST the user, I can't understand, pls help me I don't know what else to do, I didn't find anything before doing this post, tks. My files: registrations_controller.rb class RegistrationsController <…
user14068539
0
votes
1 answer

DeviseToken Auth Not Receiving token/header data to logout

I am having an issue getting devise_token_auth logout working. I am working based on these SO: How to set header and options in axios? Why am I unable to sign out using devise_token_auth and curl? This is the devise token auth, destroy method. It…