Skip to content

Commit

Permalink
Revert "Update README.md"
Browse files Browse the repository at this point in the history
This reverts commit c295cd7.
  • Loading branch information
frederikprijck committed Nov 13, 2023
1 parent c295cd7 commit d72a1f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ console.log(decodedHeader);

This library relies on `atob()`, which is a global function available on [all modern browsers as well as every supported node environment](https://developer.mozilla.org/en-US/docs/Web/API/atob#browser_compatibility).

In order to use `jwt-decode` in an environment that has no access to `atob()` (e.g. [React Native](https://github.com/facebook/hermes/issues/1178)), ensure to provide the corresponding polyfill in your application by using [`base-64`](https://www.npmjs.com/package/base-64):
In order to use `jwt-decode` in an environment that has no access to `atob()` (e.g. [React Native](https://github.com/facebook/hermes/issues/1178)), ensure to provide the corresponding polyfill in your application by using [`core-js/stable/atob`](https://www.npmjs.com/package/core-js):

```js
import "core-js/stable/atob";
```

Alternatively, you can also use [`base-64`](https://www.npmjs.com/package/base-64) and polyfill `global.atob` yourself:

```js
import { decode } from 'base-64';
Expand Down

0 comments on commit d72a1f6

Please sign in to comment.