[fix] Logged out user session issue.
This commit is contained in:
parent
0120a2b361
commit
3d06e94595
|
@ -63,10 +63,10 @@ class Api::BaseController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_resource_owner
|
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
|
@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
|
end
|
||||||
#@current_user ||= User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_user
|
def current_user
|
||||||
|
|
Loading…
Reference in New Issue