make sure auth token header is set for already signed in users too
This commit is contained in:
parent
36044b9e03
commit
92efa2e49b
1 changed files with 4 additions and 1 deletions
|
@ -162,7 +162,10 @@ const sharedStateCb = ({ dispatch, getState }) => {
|
|||
|
||||
const populateAuthTokenHeader = () => {
|
||||
return next => action => {
|
||||
if (action.type === LBRYINC_ACTIONS.USER_FETCH_SUCCESS && action.data.user.has_verified_email === true) {
|
||||
if (
|
||||
(action.type === LBRYINC_ACTIONS.USER_FETCH_SUCCESS || action.type === LBRYINC_ACTIONS.AUTHENTICATION_SUCCESS) &&
|
||||
action.data.user.has_verified_email === true
|
||||
) {
|
||||
const authToken = getAuthToken();
|
||||
Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue