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

Devise issue with set_user_by_token

I'm having what may be a simple problem and I cant seem to find a way to fix it though I did find where it is. What I am trying to do is set up devise password reset with devise_token_auth. I have the email set up with the token generator, and the…
Jay
  • 83
  • 1
  • 10
1
vote
1 answer

How to override concern in devise_token_auth

I use devise_token_auth gem. And I want override concern resource_finder.rb for modify method provider.
1
vote
1 answer

401s during low network connectivity with rails api using devise-token-auth

I have a rails api using devise-token-auth. Recently I was on really spotty/slow Wifi and I noticed I was getting 401's from my app. My theory is that the refreshing auth token is either being lost and delayed by the bad network. That being said,…
Alex
  • 1,977
  • 3
  • 13
  • 20
1
vote
1 answer

Override SessionsController to refuse access based on user attribute

I have a rails 4 project, where I'm using DeviseTokenAuth. Everything works fine, but I'd like to refuse access to user with a specific status. So basically if user.status == :locked => Account :unauthorized So this is what I've done so far class…
Mike W
  • 391
  • 4
  • 14
1
vote
1 answer

Devise reset password email points to the wrong controller

I included devise_token_auth to login from a webapp hosted elsewhere. But I'd like also to be able to sign in directly into my rails app. My routes.rb looks like this: #... devise_for :users namespace :api, defaults: {format: :json} do …
Baleato
  • 849
  • 9
  • 19
1
vote
1 answer

Implementing google sign-in server-side-flow using devise-token-auth

I can't find any documentation around implementing https://developers.google.com/identity/sign-in/web/server-side-flow with devise-token-auth. I have Rails 5 API only app. If there isn't what are the workarounds? Thanks.
Adam Young
  • 1,321
  • 4
  • 20
  • 36
1
vote
0 answers

rails api devise_token_auth How i can have multiple users for before actions

I've a problem with devise_token_auth in rails api. I need have three different types of users, and each user can see/edit different things. But i don't know how i can to put before actions in controllers for each user. For example imagine that i…
1
vote
1 answer

Rails 5 API + Vue.js frontend: form to invite users with devise_invitable

I am writing an invitation form with Vue.js. The invites should POST to a Rails 5 API. I am using devise_invitable for the invitation logic and email dispatch. However, I am having a problem with intercepting the create method, as I will be sending…
DaniG2k
  • 4,772
  • 36
  • 77
1
vote
2 answers

Unable to use devise_token_auth with active_admin

I'm trying to used devise_token_auth with active_admin. When running rails g active_admin:install User I get the following error. error usr/local/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:578:in …
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
0
votes
1 answer

How to get headers from Rails API with React JS using fetch?

I'm putting together a personal project that I need to login. the project is in react js and rails API. to login i am using devise. the devise by default when you login, it returns the access-token and client in the headers. but i can't access these…
0
votes
0 answers

recognized Not logged in (devise_auth_token)

I use devise_token_auth and devise gem in Rails about authentication. create login function below(below code is vue.js). async login() { try { const response = await axios.post(import.meta.env.VITE_APP_API_BASE +…
kuma
  • 15
  • 1
  • 3
0
votes
1 answer

How to enable "Remember Me" feature in gem devise_token_auth?

I'm using the gem devise_token_auth for authentication in my Ruby on Rails web application. I would like to know how to implement the "Remember Me" feature when using devise_token_auth. By default, when I make a request with the remember_me field…
0
votes
0 answers

'ArgumentError: invalid base64' when decoding tokens with devise_token_auth

I'm using gems devise_token_auth' and graphql_devise` for my authentication and I'm able to generate the token. Here is an example one that I just generated along with client and expiry: #
0
votes
0 answers

Authenticate multiple users on same endpoint

I have a website running on a Rails API back end, and we have multiple types of users (Admins and members). Authentication is done using the Devise Token Auth gem. Each user has their own separate endpoints so authenticating them is not an issue,…
0
votes
0 answers

React/Rails Stack with Devise Gem and ActiveStorage - How to Add Profile Picture?

For my project, I'm trying to add a profile picture, sent from a React frontend to a Rails API backend by leveraging ActiveStorage. I'm already using the devise and devise-jwt gems for authentication. I'm having trouble understanding how to…