1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Workers.Cron.ClearOauthTokenWorker do
7 The worker to cleanup expired oAuth tokens.
10 use Oban.Worker, queue: "background"
13 alias Pleroma.Web.OAuth.Token
17 if Config.get([:oauth2, :clean_expired_tokens], false) do
18 Token.delete_expired_tokens()