moved id+secret outside code

This commit is contained in:
Brandon4466
2024-04-27 20:05:14 -07:00
parent cc25fcaa34
commit 5237bb8193
3 changed files with 8 additions and 3 deletions

1
client_id Normal file
View File

@@ -0,0 +1 @@
1cb8bc27872c4bcaaad0e95f123b4f7d

1
client_secret Normal file
View File

@@ -0,0 +1 @@
9893dfb6d9eb43eebf082f9173ce937c

View File

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