This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/utils/parse-base64.js
2015-07-16 12:56:19 -08:00

9 lines
191 B
JavaScript

export default function parseBase64(token) {
let tokenData;
try {
tokenData = atob(token.split('.')[1]);
return JSON.parse(tokenData);
} catch (e) {
return tokenData;
}
}