From 28306899edd66587eb5289a98923fb061f447033 Mon Sep 17 00:00:00 2001 From: Jessica He Date: Thu, 21 Nov 2024 17:25:27 -0500 Subject: [PATCH] Decrease oauth2 token refresh grace period Signed-off-by: Jessica He --- .changeset/wet-rats-exist.md | 5 +++++ .../src/apis/implementations/auth/oauth2/OAuth2.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/wet-rats-exist.md diff --git a/.changeset/wet-rats-exist.md b/.changeset/wet-rats-exist.md new file mode 100644 index 0000000000..08bcc1c28f --- /dev/null +++ b/.changeset/wet-rats-exist.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-app-api': patch +--- + +Decrease OAuth2 token refresh grace period diff --git a/packages/core-app-api/src/apis/implementations/auth/oauth2/OAuth2.ts b/packages/core-app-api/src/apis/implementations/auth/oauth2/OAuth2.ts index dbad031652..4963330724 100644 --- a/packages/core-app-api/src/apis/implementations/auth/oauth2/OAuth2.ts +++ b/packages/core-app-api/src/apis/implementations/auth/oauth2/OAuth2.ts @@ -148,7 +148,7 @@ export default class OAuth2 (session.backstageIdentity.expiresAt.getTime() - Date.now()) / 1000, ); } - return min < 60 * 5; + return min < 60 * 3; }, });