From 63569684a392bf0c24c9c2efd7945114d1a230a5 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 11 Jan 2021 21:08:14 +0100 Subject: [PATCH] =?UTF-8?q?=E2=84=B9=20update=20jwtinfo=20store=20on=20tok?= =?UTF-8?q?en=20refresh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/store.js b/src/store.js index ea38f0d3..ef71a8da 100644 --- a/src/store.js +++ b/src/store.js @@ -27,6 +27,8 @@ const store = () => { AuthService.authControllerRefresh({ token: state.auth.refresh_token }).then((auth) => { console.log('got new auth'); OpenAPI.TOKEN = auth.access_token; + const jwtinfo = JSON.parse(atob(auth.access_token.split('.')[1])); + state.jwtinfo = jwtinfo; localForage.setItem('logindata', auth); }); },