Merge pull request #37 from gigaforge/patch-1
Automatically close out browser window after authentication is done
This commit is contained in:
commit
5b37dad373
@ -54,7 +54,7 @@ func _handle_empty_response() -> void:
|
|||||||
func _handle_success(data : Dictionary) -> void:
|
func _handle_success(data : Dictionary) -> void:
|
||||||
data["scope"] = data["scope"].uri_decode().split(" ")
|
data["scope"] = data["scope"].uri_decode().split(" ")
|
||||||
print("Success.")
|
print("Success.")
|
||||||
send_response("200 OK", "<html><head><title>Twitch Login</title></head><body>Success!</body></html>".to_utf8_buffer())
|
send_response("200 OK", "<html><head><title>Twitch Login</title></head><body onload=\"javascript:close()\">Success!</body></html>".to_utf8_buffer())
|
||||||
|
|
||||||
func _handle_error(data : Dictionary) -> void:
|
func _handle_error(data : Dictionary) -> void:
|
||||||
var msg = "Error %s: %s" % [data["error"], data["error_description"]]
|
var msg = "Error %s: %s" % [data["error"], data["error_description"]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user