本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
探索
lain.church
說明
註冊
登入
squeegily
/
pleroma
關注
1
收藏
0
複製
0
程式碼
問題
0
合併請求
0
版本發佈
42
Wiki
活動
瀏覽代碼
[
#2353
] Virtually never-expiring OAuth tokens (new and already issued ones).
merge-requests/3220/head
Ivan Tashkinov
3 年之前
父節點
ff7f7416f7
當前提交
62bf4a1292
共有
2 個檔案被更改
,包括
14 行新增
和
1 行删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
config/config.exs
+13
-0
priv/repo/migrations/20201217172858_data_migration_prolong_o_auth_tokens_valid_until.exs
+ 1
- 1
config/config.exs
查看文件
@@ -648,7 +648,7 @@ config :pleroma, :email_notifications,
}
config :pleroma, :oauth2,
token_expires_in: 3600 * 24 * 30,
token_expires_in: 3600 * 24 * 3
65 * 10
0,
issue_new_refresh_token: true,
clean_expired_tokens: false
+ 13
- 0
priv/repo/migrations/20201217172858_data_migration_prolong_o_auth_tokens_valid_until.exs
查看文件
@@ -0,0 +1,13 @@
defmodule Pleroma.Repo.Migrations.DataMigrationProlongOAuthTokensValidUntil do
use Ecto.Migration
def up do
expires_in = Pleroma.Config.get!([:oauth2, :token_expires_in])
valid_until = NaiveDateTime.add(NaiveDateTime.utc_now(), expires_in, :second)
execute("update oauth_tokens set valid_until = '#{valid_until}'")
end
def down do
:noop
end
end
Write
Preview
Loading…
取消
儲存