6 lines
153 B
JavaScript
6 lines
153 B
JavaScript
|
export const parseJwt = (token) => {
|
||
|
if (!token) return {};
|
||
|
const jwtPayload = JSON.parse(window.atob(token.split('.')[1]));
|
||
|
return jwtPayload;
|
||
|
};
|