bachya/simplisafe-python

can't use refresh token to authorize

Closed this issue · 1 comments

88gts commented

Describe the bug
can't refresh with token, can generate a token successfully but no longer use token to refresh auth. my code hasn't changed in months.

Traceback (most recent call last):
File "state.py", line 80, in
asyncio.run(main())
File "/usr/local/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "state.py", line 33, in main
simplisafe = await API.async_from_refresh_token(
File "/var/www/scripts/simplisafe-python/simplipy/api.py", line 145, in async_from_refresh_token
await api._async_refresh_access_token()
File "/var/www/scripts/simplisafe-python/simplipy/api.py", line 204, in _async_refresh_access_token
self.refresh_token = token_resp["refresh_token"]
KeyError: 'refresh_token'

To Reproduce
Steps to reproduce the behavior:

  1. authorize client and generate token
  2. use token to sign on

Duplicate of #487.