Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _authorize_rmd_token():
state = eel.btl.request.query.state
print('New refresh code request: ', state, eel.btl.request.query.code)
if state.strip() == settings.get('auth.oauth_key').strip():
code = eel.btl.request.query.code
print('Saving new reddit code.')
refresh = praw_wrapper.get_refresh_token(code)
if refresh:
settings.put('auth.refresh_token', refresh)
praw_wrapper.init()
praw_wrapper.login()
return 'Saved authorization token! Close this page to continue.'
return 'Cannot save the new auth key, something went wrong.<br><a href="../index.html">Back</a>'
def _authorize_rmd_token():
state = eel.btl.request.query.state
print('New refresh code request: ', state, eel.btl.request.query.code)
if state.strip() == settings.get('auth.oauth_key').strip():
code = eel.btl.request.query.code
print('Saving new reddit code.')
refresh = praw_wrapper.get_refresh_token(code)
if refresh:
settings.put('auth.refresh_token', refresh)
praw_wrapper.init()
praw_wrapper.login()
return 'Saved authorization token! Close this page to continue.'
return 'Cannot save the new auth key, something went wrong.<br><a href="../index.html">Back</a>'