Created
July 16, 2018 06:42
-
-
Save ashkanRmk/c67d59fb56355643976d45d497b295a2 to your computer and use it in GitHub Desktop.
This file contains 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
function base64URLEncode(str) { | |
return str.toString('base64') | |
.replace(/\+/g, '-') | |
.replace(/\//g, '_') | |
.replace(/=/g, ''); | |
} | |
var verifier = base64URLEncode(crypto.randomBytes(32)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment