-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Devise::Trackable last_signin_at attributes when new access token is created #7
Comments
@serhatbolsu i'm not familiar with device trackable. can you provide some documentation or links for what that is? any sample code for the issue you're seeing would be helpful as well. |
Yeah sure, Devise Trackable is : http://www.rubydoc.info/github/plataformatec/devise/master/Devise/Models/Trackable It basically tracks user, such as login time or ip. In order to make it work, what I use is
but like I said, I am not sure if this is ok and still gem is not working though |
Thanks for the info. I don't use the trackable extension in our apps, but I believe the devise code should fire anytime the user is set into the warden context. the devise-doorkeeper gem will automatically setup your app to support the # config/initializers/doorkeeper.rb
Doorkeeper.configure do
Devise::Doorkeeper.configure_doorkeeper(self)
# extra configuration goes below
end Here's a link to the actual implementation: |
I belive the problem is because of this #4 actually it should update the last_sign_in_at and other trackable fields. |
Issue #4 is a significant performance issue that updates the user record with every single valid OAuth request. That would be equivalent to updating the user's last_sign_in_at field every time they perform a GET request. We definitely do not want that behavior. I believe what you want is to update the last_sign_in_at anytime a new access token is issued which makes perfect sense IMO. I won't have capacity to implement this feature, but pull requests are absolutely welcomed! |
Hello,
I am using resource_owner_from_credentials flow from doorkeeper.
I have put much efford to put
trackable
to work. Also suspected that other modules are also effected,since this does not work as well.
According to->
https://github.com/doorkeeper-gem/doorkeeper/wiki/Using-Resource-Owner-Password-Credentials-flow
In order to make devise authenticate there is an alternative flow, however it does not sound good to make authentication using devise.
Is it safe to use as doorkeeper suggested or is there a missing implementation for "trackable"
Thank you,
The text was updated successfully, but these errors were encountered: