Wauplin HF staff commited on
Commit
b134489
·
verified ·
1 Parent(s): 0e5a8eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -84,6 +84,8 @@ def main_page(request: Request):
84
  if oauth_info is None:
85
  return HTML_ROOT + LOGIN_BUTTON + HTML_AFTER
86
 
 
 
87
  oauth_info.access_token_expires_at = str(oauth_info.access_token_expires_at) # JSON complains about datetimes
88
  return HTML_ROOT + LOGOUT_BUTTON.format(oauth_info=json.dumps(asdict(oauth_info), indent=2)) + HTML_AFTER
89
 
 
84
  if oauth_info is None:
85
  return HTML_ROOT + LOGIN_BUTTON + HTML_AFTER
86
 
87
+ if len(oauth_info.access_token) > 70:
88
+ oauth_info.access_token = oauth_info.access_token[:50] + "..."
89
  oauth_info.access_token_expires_at = str(oauth_info.access_token_expires_at) # JSON complains about datetimes
90
  return HTML_ROOT + LOGOUT_BUTTON.format(oauth_info=json.dumps(asdict(oauth_info), indent=2)) + HTML_AFTER
91