From 601c081f1033fafeb0b381b7caa1bfd9de4ce5e2 Mon Sep 17 00:00:00 2001 From: Jessop Breth Date: Wed, 29 May 2019 13:40:57 -0400 Subject: [PATCH] auth header token --- package.json | 2 +- src/ui/index.jsx | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 43448d283..d0bcaefe6 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "jsmediatags": "^3.8.1", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#02f6918238110726c0b3b4248c61a84ac0b969e3", + "lbry-redux": "lbryio/lbry-redux#ed94218cdb3409b963aec136ffe3c11c9e3bc875", "lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/src/ui/index.jsx b/src/ui/index.jsx index 9ad9d0491..c3d073c5d 100644 --- a/src/ui/index.jsx +++ b/src/ui/index.jsx @@ -89,6 +89,7 @@ Lbryio.setOverride( () => new Promise(resolve => { if (authToken) { + Lbry.setApiHeader('X-Lbry-Auth-Token', authToken); resolve(authToken); } else { // @if TARGET='app' @@ -101,6 +102,10 @@ Lbryio.setOverride( // @endif // @if TARGET='web' const { auth_token: authToken } = cookie.parse(document.cookie); + + if (authToken) { + Lbry.setApiHeader('X-Lbry-Auth-Token', authToken); + } resolve(authToken); // @endif } -- 2.45.3