[fix] Logged out user session issue.
This commit is contained in:
parent
0120a2b361
commit
3d06e94595
|
@ -63,10 +63,10 @@ class Api::BaseController < ApplicationController
|
|||
end
|
||||
|
||||
def current_resource_owner
|
||||
return @current_user if doorkeeper_token.nil?
|
||||
@current_user ||= Rails.cache.fetch("dk:user:#{doorkeeper_token.resource_owner_id}", expires_in: 25.hours) do
|
||||
User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
|
||||
User.find(doorkeeper_token.resource_owner_id)
|
||||
end
|
||||
#@current_user ||= User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
|
||||
end
|
||||
|
||||
def current_user
|
||||
|
|
Loading…
Reference in New Issue