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() {\
|
||||
var url = window.location.href;\
|
||||
var test = url.indexOf(\"access_token\");\
|
||||
const queryString = window.location.search;\
|
||||
const urlParams = new URLSearchParams(queryString);\
|
||||
const token = urlParams.get(\"access_token\")\
|
||||
var qs = new URL(window.location.href.replace(/#/g,\"?\"));\
|
||||
var token = qs.searchParams.get(\"access_token\");\
|
||||
var scope = qs.searchParams.get(\"scope\");\
|
||||
if (test != -1) { \
|
||||
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 \
|
||||
the bot.</p>\";}}\
|
||||
</script>\
|
||||
|
|
Loading…
Reference in New Issue