Closed warmans closed 2 years ago
There is two problems here:
atob
does not apparently fully support base64. _
is a valid base64 character but not according to all browsers. a quick fix for this is to just replace the _
: decodeBase64(str: string): string {
return atob(str.replace(/_/g, '/'));
}
Tokens containing a new-style reddit user icon are unable to login because base64 decoding the JWT token sections with
atob()
triggers the following exception: