Last active
August 23, 2018 13:35
-
-
Save kirpalmakanga/882b1a6c0510a07379183f2c354f41e8 to your computer and use it in GitHub Desktop.
Generate basic token
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
import { Buffer } from 'buffer'; | |
const generateBasicToken = (user, pass) => | |
new Buffer([user, pass].join(':')).toString('base64'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment