mirror of
				https://gitlab.com/gpvkt/twitchtts.git
				synced 2025-10-31 00:57:35 +01:00 
			
		
		
		
	Improved oauth response access_token handling
This commit is contained in:
		
							parent
							
								
									a3358bf9f9
								
							
						
					
					
						commit
						591909a94c
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								tts.exe
									
										
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tts.exe
									
										
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										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…
	
	Add table
		
		Reference in a new issue