From 8c44054526c88c49d7442cd41126b16911889fb8 Mon Sep 17 00:00:00 2001
From: Alf Eaton <eaton.alf@gmail.com>
Date: Tue, 5 Sep 2017 22:38:25 +0100
Subject: [PATCH] Add omponentWillReceiveProps to LogoutPage

---
 .../component-authentication/src/components/LogoutPage.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/packages/component-authentication/src/components/LogoutPage.js b/packages/component-authentication/src/components/LogoutPage.js
index 266f83d76..f526986db 100644
--- a/packages/component-authentication/src/components/LogoutPage.js
+++ b/packages/component-authentication/src/components/LogoutPage.js
@@ -12,6 +12,14 @@ class Logout extends React.Component {
     }
   }
 
+  componentWillReceiveProps (nextProps) {
+    const { isAuthenticated, logout } = nextProps
+
+    if (isAuthenticated) {
+      logout()
+    }
+  }
+
   render () {
     const { isAuthenticated } = this.props
 
-- 
GitLab