moved id+secret outside code

This commit is contained in:
Brandon4466
2024-04-27 20:07:40 -07:00
parent 5237bb8193
commit 75057d6bb6
5 changed files with 8 additions and 5 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
client_id
client_secret
code

View File

@@ -1 +1 @@
1cb8bc27872c4bcaaad0e95f123b4f7d 8af579a41b724877bd8e68fa5eb86925

View File

@@ -1 +1 @@
9893dfb6d9eb43eebf082f9173ce937c 0e6cb5b085a24296a07430dd14bbc560

1
code
View File

@@ -1 +0,0 @@
AQCZgUjpd41T5OxjgCR08o-WIKMoJVOkKQnnXWWyCMPfr9AF8OOauNn9wYPX4sFKpWxINeHmeimsNw7c2e1HVCu038drk_o9K-0rdgtG7QlQc02ENsbkJC5tjr3M40-oxdmoz203NA_qj1J_DyQBx6TA-FbHS8WXiDTIn9pB3IpVNCSCf8kubjn6MOvDU8w6uXyjwCDLUBN5ptfARe4yFEXKNlgxgQcbAsj0DPpS4owhvYbo-tAwINmyJPuO61-TUbQ6U5qWLN7A1UkhbAkX0kJfFd3WnCsGiDpQmgLmmb8

View File

@@ -10,10 +10,11 @@ import syncedlyrics
app = Flask(__name__) app = Flask(__name__)
if os.path.exists('client_id'): if os.path.exists('client_id'):
with open('code', 'r') as file: with open('client_id', 'r') as file:
client_id = file.read() client_id = file.read()
print(client_id)
if os.path.exists('client_secret'): if os.path.exists('client_secret'):
with open('code', 'r') as file: with open('client_secret', 'r') as file:
client_secret = file.read() client_secret = file.read()
redirect_uri = 'http://127.0.0.1:8888/callback' redirect_uri = 'http://127.0.0.1:8888/callback'
encoded_creds = base64.b64encode(client_id.encode() + b':' + client_secret.encode()).decode("utf-8") encoded_creds = base64.b64encode(client_id.encode() + b':' + client_secret.encode()).decode("utf-8")