Created
July 18, 2019 15:58
-
-
Save jgcmarins/899a1e5112eb291ed9054264b5021d2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://twitter.com/wongmjane/status/1151680678682976258 | |
| const csrfToken = () => window.crypto.getRandomValues(new Uint8Array(32)).reduce( | |
| (acc, n) => `${acc}${n.toString(16).substring(-1)}`, '' | |
| ) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output example:
