atepper commited on
Commit
80ce502
·
1 Parent(s): 5ab44b9

debug client id and secret

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -10,6 +10,9 @@ sp_oauth = SpotifyOAuth(client_id=st.secrets["SPOTIFY_CLIENT_ID"],
10
  redirect_uri=REDIRECT_URI,
11
  scope=SPOTIFY_SCOPE)
12
 
 
 
 
13
  if 'auth_token' not in st.session_state:
14
  st.session_state['auth_token'] = None
15
 
@@ -21,7 +24,7 @@ if st.session_state['auth_token'] is None:
21
  # The page will redirect to the redirect URI with a code parameter
22
  code = st.query_params.get('code')
23
  if code:
24
- st.write(f"Code: {code}") # Debug line to display the code
25
  code = code[0] # Get the first item from the list
26
  token_info = sp_oauth.get_access_token(code, as_dict=False)
27
  st.session_state['auth_token'] = token_info['access_token']
 
10
  redirect_uri=REDIRECT_URI,
11
  scope=SPOTIFY_SCOPE)
12
 
13
+ st.markdown(f'Client ID: {st.secrets["SPOTIFY_CLIENT_ID"]}')
14
+ st.markdown(f'Client Secret: {st.secrets["SPOTIFY_CLIENT_SECRET"]}')
15
+
16
  if 'auth_token' not in st.session_state:
17
  st.session_state['auth_token'] = None
18
 
 
24
  # The page will redirect to the redirect URI with a code parameter
25
  code = st.query_params.get('code')
26
  if code:
27
+ # st.write(f"Code: {code}") # Debug line to display the code
28
  code = code[0] # Get the first item from the list
29
  token_info = sp_oauth.get_access_token(code, as_dict=False)
30
  st.session_state['auth_token'] = token_info['access_token']