replace atob with Buffer
parent
aba635b7cc
commit
eec7701125
|
@ -10,7 +10,8 @@ const decodeToken = (): TuitioTokenData | null => {
|
|||
const authData = getItem(storageKeys.AUTH_DATA);
|
||||
if (!authData) return null;
|
||||
const { token } = authData;
|
||||
const decodedTokenString = atob(token);
|
||||
const decodedTokenBuffer = Buffer.from(token, "base64");
|
||||
const decodedTokenString = decodedTokenBuffer.toString("utf-8");
|
||||
const decodedToken = camelizeKeys(JSON.parse(decodedTokenString));
|
||||
return decodedToken;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue