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
static inline bool is_base64(BYTE c) { | |
return (isalnum(c) || (c == '+') || (c == '/')); | |
} | |
std::string base64_encode(BYTE const* buf, unsigned int bufLen) { | |
std::string ret; | |
int i = 0; | |
int j = 0; | |
BYTE char_array_3[3]; | |
BYTE char_array_4[4]; |
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
func main() { | |
// local server to capture token | |
go startSever() | |
openBrowser(fmt.Sprintf("https://id.twitch.tv/oauth2/authorize?client_id=%s&redirect_uri=%s&response_type=token&scope=%s", clientID, redirectURI, scope)) | |
// TODO | |
for{ | |
} | |
} | |
func startSever() { |