Skip to content

Commit

Permalink
Merge pull request #37 from gigaforge/patch-1
Browse files Browse the repository at this point in the history
Automatically close out browser window after authentication is done
  • Loading branch information
issork authored Dec 19, 2023
2 parents 9180cfa + 5987a59 commit 5b37dad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/gift/auth/grant_flows/redirecting_flow.gd
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func _handle_empty_response() -> void:
func _handle_success(data : Dictionary) -> void:
data["scope"] = data["scope"].uri_decode().split(" ")
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:
var msg = "Error %s: %s" % [data["error"], data["error_description"]]
Expand Down

0 comments on commit 5b37dad

Please sign in to comment.