oneapi / web /src /helpers /auth-header.js
BG5's picture
Upload 134 files
c6be9e8
export function authHeader() {
// return authorization header with jwt token
let user = JSON.parse(localStorage.getItem('user'));
if (user && user.token) {
return { 'Authorization': 'Bearer ' + user.token };
} else {
return {};
}
}