Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test → val (28 October 2024) #11899

Merged
merged 35 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f104540
[Snyk] Security upgrade vite from 5.3.5 to 5.3.6 (#11861)
mdct-github-service-account Sep 19, 2024
5d6d76a
update macfc security hub github action (#11862)
gmrabian Sep 20, 2024
e5127f3
fix scss deprecation warning (#11863)
gmrabian Sep 20, 2024
114b451
upgrade aws sdk versions (#11864)
gmrabian Sep 23, 2024
a3b85d0
[Snyk] Upgrade react-router-dom from 6.25.1 to 6.26.1 (#11866)
mdct-github-service-account Sep 24, 2024
b048444
refactor api response pattern (#11865)
gmrabian Sep 25, 2024
c4bf725
[Snyk] Upgrade @emotion/react from 11.11.4 to 11.13.3 (#11868)
mdct-github-service-account Sep 26, 2024
438d80f
[Snyk] Upgrade jsdom from 24.1.0 to 24.1.3 (#11869)
mdct-github-service-account Oct 2, 2024
32dd4a7
[Snyk] Upgrade react-hook-form from 7.52.1 to 7.53.0 (#11870)
mdct-github-service-account Oct 3, 2024
41a7cef
[Snyk] Upgrade react-router-dom from 6.26.1 to 6.26.2 (#11871)
mdct-github-service-account Oct 8, 2024
5b5647c
Cmdct 4026 - Prior Authorization Section B (#11872)
britt-mo Oct 8, 2024
8955a56
Cmdct 4027 - patient access section under nov macpar release flag (#1…
britt-mo Oct 9, 2024
2e145d7
Section b updates (#11875)
britt-mo Oct 16, 2024
31fc9f7
CMDCT-4028: Prior Authorization Section D (#11867)
karla-vm Oct 16, 2024
1c7f1d1
Upgrade amplify to v6 (#11876)
gmrabian Oct 17, 2024
198ebca
CMDCT-4050: Allow "NR" Values for Number Fields (#11877)
karla-vm Oct 18, 2024
68625a2
[Snyk] Upgrade @aws-sdk/client-dynamodb from 3.654.0 to 3.658.1 (#11879)
mdct-github-service-account Oct 21, 2024
61d7b5b
CMDCT-4051: Addressing MCPAR Design Feedback (#11878)
karla-vm Oct 21, 2024
6bb6266
[Snyk] Upgrade @aws-sdk/lib-dynamodb from 3.654.0 to 3.658.1 (#11882)
mdct-github-service-account Oct 22, 2024
ea82a29
[Snyk] Upgrade @aws-sdk/client-s3 from 3.654.0 to 3.658.1 (#11880)
mdct-github-service-account Oct 22, 2024
ab1644e
Console Cleanup (#11883)
karla-vm Oct 22, 2024
b97b954
Fixup amplify types and methods (#11886)
gmrabian Oct 23, 2024
715bbb9
Amplify: add implicit oauth grant to see if it fixes IDM login (#11887)
gmrabian Oct 23, 2024
53edd31
[Snyk] Upgrade sass from 1.77.7 to 1.79.4 (#11884)
mdct-github-service-account Oct 23, 2024
b51fdbe
[Snyk] Upgrade dompurify from 2.5.5 to 2.5.7 (#11885)
mdct-github-service-account Oct 23, 2024
7c9dfd8
Amplify: Add Package from CARTS (#11888)
karla-vm Oct 23, 2024
16ebc16
await auth and update types (#11892)
gmrabian Oct 24, 2024
921ee2f
[Snyk] Upgrade @aws-sdk/client-cognito-identity-provider from 3.654.0…
mdct-github-service-account Oct 24, 2024
3b4f17c
Log auth (#11894)
gmrabian Oct 24, 2024
609001b
revert to old redirect style (#11895)
gmrabian Oct 24, 2024
6643755
Bug Fix: Admin Dashboard Button Styling (#11893)
karla-vm Oct 24, 2024
9b42cf7
Add oauth listener import to app root (#11897)
gmrabian Oct 25, 2024
e3c74dc
MCR - Disabled button darker and text update (#11896)
rocio-desantiago Oct 25, 2024
882bc9d
move idm method back to amplify method (#11898)
gmrabian Oct 25, 2024
26e7fb4
Refactor amplify methods to single file (#11881)
bangbay-bluetiger Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Log auth (#11894)
gmrabian authored Oct 24, 2024
commit 3b4f17c3295e14411fb3241b4f395f4c475770ca
22 changes: 21 additions & 1 deletion services/ui-src/src/utils/auth/UserProvider.tsx
Original file line number Diff line number Diff line change
@@ -8,9 +8,11 @@ import {
import { useLocation } from "react-router-dom";
import {
fetchAuthSession,
getCurrentUser,
signInWithRedirect,
signOut,
} from "aws-amplify/auth";
import { Hub } from "aws-amplify/utils";
import config from "config";
// utils
import { initAuthManager, updateTimeout, getExpiration, useStore } from "utils";
@@ -25,8 +27,26 @@ export const UserContext = createContext<UserContextShape>({
getExpiration: () => {},
});

/* eslint-disable no-console */
Hub.listen("auth", async ({ payload }) => {
switch (payload.event) {
case "signInWithRedirect":
// eslint-disable-next-line no-case-declarations
const user = await getCurrentUser();
console.log(user.username);
break;
case "signInWithRedirect_failure":
console.log("payload", payload);
break;
}
});

const authenticateWithIDM = async () => {
await signInWithRedirect({ provider: { custom: "Okta" } });
try {
await signInWithRedirect({ provider: { custom: "Okta" } });
} catch (err: any) {
console.error("error", err);
}
};

export const UserProvider = ({ children }: Props) => {