Skip to content

Commit

Permalink
Add setCookie onUserAuthenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
aneelac22 committed Dec 6, 2023
1 parent 7b15489 commit 708f58e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/auth/OIDCConnector/OIDCSecured.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -139,6 +140,7 @@ export function OIDCSecured({
token: user.access_token,
tokenExpires: user.expires_at!,
}));
await setCookie(state.token, state.tokenExpires);
sentry(chromeUser);
}

Expand Down

0 comments on commit 708f58e

Please sign in to comment.