From d5abe13a7e323a3a20f52c66394ae993065b1e98 Mon Sep 17 00:00:00 2001 From: Michael Zetterberg Date: Wed, 23 Oct 2024 12:18:08 +0200 Subject: [PATCH] fix: add feature flag for service token scopes --- server/tokenManager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/tokenManager.ts b/server/tokenManager.ts index cdd6078dc..24180d017 100644 --- a/server/tokenManager.ts +++ b/server/tokenManager.ts @@ -70,7 +70,12 @@ async function fetchServiceToken(scopes: string[]) { } export async function getServiceToken() { - const scopes = ["profile", "hotel", "booking"] + let scopes: string[] = [] + if (env.HIDE_FOR_NEXT_RELEASE) { + scopes = ["profile"] + } else { + scopes = ["profile", "hotel", "booking"] + } const tag = generateServiceTokenTag(scopes) const getCachedJwt = unstable_cache( async (scopes) => {