From 708f58e7f8d9784b78d2d175647a75e71a324820 Mon Sep 17 00:00:00 2001 From: Aneela Chagarlamudi Date: Wed, 6 Dec 2023 13:18:19 -0500 Subject: [PATCH] Add setCookie onUserAuthenticated --- src/auth/OIDCConnector/OIDCSecured.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/auth/OIDCConnector/OIDCSecured.tsx b/src/auth/OIDCConnector/OIDCSecured.tsx index 8d5b8503d3..122d05d075 100644 --- a/src/auth/OIDCConnector/OIDCSecured.tsx +++ b/src/auth/OIDCConnector/OIDCSecured.tsx @@ -19,6 +19,7 @@ import { login, logout } from './utils'; import createGetUserPermissions from '../createGetUserPermissions'; import initializeAccessRequestCookies from '../initializeAccessRequestCookies'; import { getOfflineToken, prepareOfflineRedirect } from '../offline'; +import { setCookie } from '../setCookie'; type Entitlement = { is_entitled: boolean; is_trial: boolean }; const serviceAPI = entitlementsApi(); @@ -139,6 +140,7 @@ export function OIDCSecured({ token: user.access_token, tokenExpires: user.expires_at!, })); + await setCookie(state.token, state.tokenExpires); sentry(chromeUser); }