Skip to content

Commit

Permalink
just another possible fix for #6 and #8
Browse files Browse the repository at this point in the history
  • Loading branch information
inbalboa committed Apr 29, 2024
1 parent 3decce7 commit d53ac51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pymstodo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from enum import Enum
from typing import Any, Literal, TypedDict
from zoneinfo import ZoneInfo
import os

from requests_oauthlib import OAuth2Session

Expand Down Expand Up @@ -243,7 +244,7 @@ class ToDoConnection:
token: Token obtained by method `get_token`
'''
_redirect: str = 'https://localhost/login/authorized'
_scope: str = 'openid Tasks.ReadWrite email profile'
_scope: str = 'openid offline_access Tasks.ReadWrite'
_authority: str = 'https://login.microsoftonline.com/common'
_authorize_endpoint: str = '/oauth2/v2.0/authorize'
_token_endpoint: str = '/oauth2/v2.0/token'
Expand Down Expand Up @@ -541,3 +542,6 @@ def complete_task(self, task_id: str, list_id: str) -> Task:
Raises:
PymstodoError: An error occurred accessing the API'''
return self.update_task(task_id, list_id, status='completed')

os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE'] = '1'
os.environ['OAUTHLIB_IGNORE_SCOPE_CHANGE'] = '1'

0 comments on commit d53ac51

Please sign in to comment.