gonzalo-bulnes / simple_token_authentication

Simple (and safe*) token authentication for Rails apps or API with Devise.
GNU General Public License v3.0
1.51k stars 238 forks source link

Trackable not working? #341

Open josephsiefers opened 5 years ago

josephsiefers commented 5 years ago

We're having a great experience with the library so far, but noticed a puzzling issue with trackable. In the sample initializer, I noticed and configured the following:

SimpleTokenAuthentication.configure do |config|
  # Configure the Devise trackable strategy integration.
  #
  # If true, tracking is disabled for token authentication: signing in through
  # token authentication won't modify the Devise trackable statistics.
  #
  # If false, given Devise trackable is configured for the relevant model,
  # then signing in through token authentication will be tracked as any other sign in.
  #
  config.skip_devise_trackable = false
end

While using tokens, I'm not seeing any changes to devise trackable module attributes (e.g., sign_in_count, etc). My devise model is configured as follows:

class User < ActiveRecord::Base
  acts_as_token_authenticatable

  devise :database_authenticatable, :registerable, :confirmable,
         :recoverable, :rememberable, :trackable, :validatable, :invitable
  end
end

Any idea as to what the cause might be?

Thanks