Skip to content

Commit 94765d5

Browse files
authored
Merge pull request #363 from awslabs/dev
fix logout reload race
2 parents 27e496e + a26beff commit 94765d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pages/Logout/Logout.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ class Logout extends React.Component {
8383
// We remove the client-id used for last login
8484
localStorage.removeItem('client-id');
8585

86-
Auth.signOut(); // Sign the user out
87-
window.location.reload(); // Reload the page to handle the client redirect
86+
// Sign the user out
87+
Auth.signOut().then(() => {
88+
window.location.reload(); // Reload the page to handle the client redirect
89+
});
8890
}
8991
}
9092

0 commit comments

Comments
 (0)