[gd_scene load_steps=6 format=3 uid="uid://b4n67bt8ni6ge"]

[ext_resource type="Script" uid="uid://bp1fga8addrlc" path="res://addons/twitcher/editor/inspector/twitch_token_revoke_popup.gd" id="1_4n8su"]
[ext_resource type="Script" uid="uid://blnbogtrshw4r" path="res://addons/twitcher/auth/twitch_token_handler.gd" id="2_iycl8"]
[ext_resource type="Resource" uid="uid://c4scwuk8q0r40" path="res://addons/twitcher/lib/oOuch/default_key_provider.tres" id="3_4n8su"]
[ext_resource type="Script" uid="uid://b52xp7c23ucfk" path="res://addons/twitcher/lib/oOuch/oauth_token.gd" id="4_iycl8"]

[sub_resource type="Resource" id="Resource_twsgi"]
script = ExtResource("4_iycl8")
_crypto_key_provider = ExtResource("3_4n8su")
_identifier = "Auth-2409"
_cache_path = "user://auth.conf"

[node name="TokenRevokePopup" type="Window"]
title = "Revoke Token"
position = Vector2i(0, 36)
size = Vector2i(400, 200)
script = ExtResource("1_4n8su")

[node name="MarginContainer" type="MarginContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2

[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 50)
layout_mode = 2
text = "You can decide to revoke the token locally or actually invalidate it on Twitch side too. To revoke it on Twitch the client id must be known: "
autowrap_mode = 3

[node name="Inspector" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2

[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Inspector"]
layout_mode = 2
text = "OAuth Setting:"

[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 10

[node name="Cancel" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "Cancel"

[node name="RevokeTwitch" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "Revoke on Twitch"

[node name="RevokeLocally" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "Revoke Locally"

[node name="TwitchTokenHandler" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("2_iycl8")
token = SubResource("Resource_twsgi")
metadata/_custom_type_script = "uid://blnbogtrshw4r"
