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
1
vote
1 answer

Implement Devise token auth in existing rails app

I am working on a rails 7 app which has devise authentication running properly. I want to implement devise token auth in it. I have set up all the thing but devise token auth produces a migration file and creates users table. Exactly here i am…
Muhammad Ans
  • 157
  • 8
1
vote
1 answer

Return authorization token with users credentials after sign in using devise-auth-token

I am using devise-auth-token. It is working perfectly. I want when a user is signed in, she/she should get authorization not only in header section but also with the user fields. Following are the screen shots attached for everyone to understand it…
Muhammad Ans
  • 157
  • 8
1
vote
0 answers

Add custom routes to devise returns 404 ActionNotFound

I would like to create a new routes and method inside my Sessions Controller within Devise. I am using devise_token_auth Here is my original routes.rb for devise : namespace :api do namespace :v1 do mount_devise_token_auth_for 'User', as:…
ZazOufUmI
  • 3,212
  • 6
  • 37
  • 67
1
vote
1 answer

How can I solve this issue for the login?

Hi Everyone I will appreciate if someone can help me with this error: I'm building a ruby on rails app using Devise Gem. --Error-- undefined method `current_sign_in_at' for #
1
vote
2 answers

DeviseTokenAuth in Rails Application

I am implementing a session in my Rails Application, and I'm using DeviseTokenAuth gem. I want to implement a scenario that If a user does not send a request from the Front-end in 15 minutes, then the session should expire; The session is valid for…
Adnan
  • 195
  • 3
  • 9
1
vote
0 answers

Chatwoot, Session/Cookie issue, getting `current_user` on custom added Rails View even after logout from Vue side

https://www.chatwoot.com is open source chat solution provider app. Developed in Rails and Vuejs. It's using DeviseTokenAuth gem for authentication. I want the current_user to work on both Vue side and Rails view side. So If I'm using token based…
1
vote
1 answer

How to send sign in info to frontend after successful Oauth2 authorization in devise_token_auth?

I'm using devise_token_auth for Email and Google Oauth2 based authentication(used omniauth-google-oauth2 gem for this). I've successfully managed to store sign in info of the user signing up/in through Google Oauth2 flow. The info…
1
vote
0 answers

devise token auth and devise duplication in controllers

I have put together a Rails 6 backend with Devise and Devise token auth and a frontend Angular Nativescript application which uses the API. Ref; Backend: https://github.com/map7/backend_rails6_template Mobile Frontend:…
map7
  • 5,096
  • 6
  • 65
  • 128
1
vote
0 answers

JWT::DecodeError for sign_out with invalid token with devise-jwt

I am trying to rescue_from a JWT::DecodeError caused by an invalid token when signing out using devise. But it's not working. I keep getting a JWT::DecodeError. Sessions controller: class SessionsController < Devise::SessionsController …
1
vote
1 answer

Devise Token Auth confirmation email link expired

I am currently developing a website and i have a problem with te confirmation link with devise token auth. Everything is working right, after someones registers they get an email with a confirmation link. This link is confirming and working properly…
Julio Lopez
  • 1,107
  • 1
  • 9
  • 17
1
vote
1 answer

How should I approach adding a react front-end to a web app built with rails?

I have an app that I've built with ruby on rails in the backend with the front end being simple rails views. I'd like to add react to the front end to make it look nicer. I have read about using the react-rails gem, or creating a new react app and…
1
vote
0 answers

DeviseTokenAuth with multiple emails per user

I want to allow my users to manage multiple email addresses, setting a primary one. I know Devise gem encourages the use of the gem devise-multi_email which I have used https://github.com/allenwq/devise-multi_email The problem is that I also use…
Leticia Esperon
  • 2,499
  • 1
  • 18
  • 40
1
vote
0 answers

Rails "Devise Token Auth" function is slow on user update

i have Rails application with "devise_token_auth" gem. I noticed a very slow SQL update when access token expires, and a new access token is saved in User. I noticed that the users table is locked during the update, but looking at the gem code that…
1
vote
0 answers

How to send Access-Token in response from devise-auth-token

I'm Using devise auth token for authentication in my rails application and I want to return uid , client and access-token in the header of the response def custom_registration_function new_user = User.new(....) if(new_user.save) // here…
1
vote
2 answers

How to access current_user with devise-token_authenticatable gem?

I’m working on a small project that is using devise and devise-token_authenticatable in a Rails/GraphQL/Apollo/React setup. Project is setup using webpacker, so the front and back ends are both served from the same domain. Sign-in, register, log-out…
1 2
3
9 10