Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 031a8c9

Browse files
committed
updated variables names and removed login prompt
1 parent c13adc7 commit 031a8c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

2-Authorization-I/1-call-graph/SPA/src/components/SessionManager.jsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const SessionManager = ({ children }) => {
1111
if (account && inProgress === InteractionStatus.None) {
1212
let expiresAt = moment(new Date(account.idTokenClaims.exp * 1000));
1313
let currentTime = moment(new Date());
14-
let diffInMilliseconds = endDate.diff(startData);
14+
let diffInMilliseconds = expiresAt.diff(currentTime);
1515

1616
if (diffInMilliseconds <= 0) {
1717
instance
@@ -22,8 +22,7 @@ export const SessionManager = ({ children }) => {
2222
.catch((error) => {
2323
if (error instanceof InteractionRequiredAuthError) {
2424
instance.loginRedirect({
25-
...loginRequest,
26-
prompt: 'login',
25+
...loginRequest
2726
});
2827
}
2928
});

0 commit comments

Comments
 (0)