1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.DataMigrationProlongOAuthTokensValidUntil do
9 expires_in = Pleroma.Config.get!([:oauth2, :token_expires_in])
10 valid_until = NaiveDateTime.add(NaiveDateTime.utc_now(), expires_in, :second)
11 execute("update oauth_tokens set valid_until = '#{valid_until}'")