PageSourceSearch

https://app.clariumhealth.com/assets/getCurrentUser-BNfTg9dP.js

js clariumhealth.com collected 2026-10-03 20:43:01 UTC 888 bytes, 25 lines download raw bytes

1import { t as Amplify } from "./Amplify-D0fRojM9.js";
2import { _ as assertTokenProviderConfig, n as assertAuthTokens } from "./types-Badw_GZ3.js";
3var getCurrentUser = async (amplify) => {
4	const authConfig = amplify.getConfig().Auth?.Cognito;
5	assertTokenProviderConfig(authConfig);
6	const tokens = await amplify.Auth.getTokens({ forceRefresh: false });
7	assertAuthTokens(tokens);
8	const { "cognito:username": username, sub } = tokens.idToken?.payload ?? {};
9	const authUser = {
10		username,
11		userId: sub
12	};
13	const signInDetails = getSignInDetailsFromTokens(tokens);
14	if (signInDetails) authUser.signInDetails = signInDetails;
15	return authUser;
16};
17function getSignInDetailsFromTokens(tokens) {
18	return tokens?.signInDetails;
19}
20var getCurrentUser$1 = async () => {
21	return getCurrentUser(Amplify);
22};
23export { getCurrentUser$1 as t };
24
25//# sourceMappingURL=getCurrentUser-BNfTg9dP.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.