tod0 icon indicating copy to clipboard operation
tod0 copied to clipboard

Sign in with new credentials fails

Open EricAndrechek opened this issue 2 years ago • 1 comments

I followed the steps illustrated in the documentation for registering a new token and such and triple-checked it, but when pasting it into my terminal I get an error:

Traceback (most recent call last):
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/oauth.py", line 75, in get_token
    with open(os.path.join(config_dir, "token.pkl"), "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/eric/.config/tod0/token.pkl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/eric/.local/bin/tod0", line 5, in <module>
    from todocli.interface import run
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/interface.py", line 74, in <module>
    load_folders()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/interface.py", line 57, in load_folders
    lists = todo_api.query_lists()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/todo_api.py", line 154, in query_lists
    result = RestRequestGet(api_urls.all_lists()).execute()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/rest_request.py", line 40, in execute
    outlook = get_oauth_session()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/oauth.py", line 128, in get_oauth_session
    token = get_token()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/oauth.py", line 92, in get_token
    token = outlook.fetch_token(
  File "/home/eric/.local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 366, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
    validate_token_parameters(params)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 438, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/errors.py", line 405, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client) AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '********-****-****-****-************'.
Trace ID: 48208d5a-4290-4158-896d-64e5c9f90f00
Correlation ID: 084ce5e8-c493-4027-a58d-420883ce39f1
Timestamp: 2022-06-13 22:04:14Z

Not really sure how to troubleshoot this further, let me know what I can do to help, I'd love to be able to use this!

EricAndrechek avatar Jun 13 '22 22:06 EricAndrechek

Hi. Are you sure you pasted the client secret "value" and not client secret "ID"?

oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client) AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '********-****-****-****-************'.

kiblee avatar Aug 21 '22 18:08 kiblee