Skip to content

Commit

Permalink
🐛 Remove depreacted atob to allow modern jwt tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonErath committed Jan 23, 2025
1 parent 4c6e007 commit 4d0b557
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ export const toBase64 = (input: string): string => {
};

export const fromBase64 = (input: string): string => {
if (typeof atob !== 'undefined') {
return atob(input);
} else {
return Buffer.from(input, 'base64').toString('binary');
}
return Buffer.from(input, 'base64').toString('binary');
};

0 comments on commit 4d0b557

Please sign in to comment.