-
I am currently trying to implement logout using a JSON Rodauth API. I was reading the rodauth JWT spec and saw this:
Because of that, I have added an class RodauthMain < Rodauth::Rails::Auth
def merge_account
account = Account.find(account_id)
json_response.merge!(account: AccountResource.new(account).serializable_hash)
end
configure do
# List of authentication features that are loaded.
enable :create_account, :verify_account, :verify_account_grace_period,
:login, :logout, :json,
:reset_password, :change_password, :change_password_notify,
:change_login, :verify_login_change, :close_account, :jwt_refresh, :jwt, :active_sessions
# ...other rodauth settings
after_logout do
remove_active_session(@jwt_payload['active_session_id'])
end
end
end Unfortunately, I am still able to make requests using that JWT token even after logging out. When I make a request to logout, I see this response:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found this discussion and was able to resolve it. |
Beta Was this translation helpful? Give feedback.
I found this discussion and was able to resolve it.