From 6d3bf7eb5843fba892262254fb67181559c5058b Mon Sep 17 00:00:00 2001 From: Luis Felipe Risch <lfr20@inf.ufpr.br> Date: Wed, 3 Feb 2021 12:37:41 -0300 Subject: [PATCH] Function to save tokens from response --- src/Components/HelperFunctions/saveTokens.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/Components/HelperFunctions/saveTokens.js diff --git a/src/Components/HelperFunctions/saveTokens.js b/src/Components/HelperFunctions/saveTokens.js new file mode 100644 index 00000000..15b89b05 --- /dev/null +++ b/src/Components/HelperFunctions/saveTokens.js @@ -0,0 +1,6 @@ +export const saveHeaders = (response) => { + if (response.headers['access-token']) + sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token']) + if (response.headers.client) + sessionStorage.setItem('@portalmec/clientToken', response.headers.client) +} \ No newline at end of file -- GitLab