mirror of https://gitlab.com/gpvkt/twitchtts.git
Improved oauth response access_token handling
This commit is contained in:
parent
a3358bf9f9
commit
591909a94c
8
tts.py
8
tts.py
|
@ -1259,12 +1259,12 @@ class HTTPserv(BaseHTTPRequestHandler):
|
||||||
function displayCode() {\
|
function displayCode() {\
|
||||||
var url = window.location.href;\
|
var url = window.location.href;\
|
||||||
var test = url.indexOf(\"access_token\");\
|
var test = url.indexOf(\"access_token\");\
|
||||||
const queryString = window.location.search;\
|
var qs = new URL(window.location.href.replace(/#/g,\"?\"));\
|
||||||
const urlParams = new URLSearchParams(queryString);\
|
var token = qs.searchParams.get(\"access_token\");\
|
||||||
const token = urlParams.get(\"access_token\")\
|
var scope = qs.searchParams.get(\"scope\");\
|
||||||
if (test != -1) { \
|
if (test != -1) { \
|
||||||
document.getElementById(\"code\").innerHTML = \"\
|
document.getElementById(\"code\").innerHTML = \"\
|
||||||
<p>oauth:\" + token + \"</p>\
|
<p>Token:<br />oauth:\" + token + \"</p><p>Scope:<br />\" + scope + \"</p><p>URL:<br />\"+ url +\"</p>\
|
||||||
<p>Copy the token into your config.yml and restart \
|
<p>Copy the token into your config.yml and restart \
|
||||||
the bot.</p>\";}}\
|
the bot.</p>\";}}\
|
||||||
</script>\
|
</script>\
|
||||||
|
|
Loading…
Reference in New Issue