Skip to content

Commit 967e22c

Browse files
committed
Change device flow's scope into scopes
1 parent 8654230 commit 967e22c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

msal/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ def acquire_token_silent(
245245
logging.debug(
246246
"Refresh failed. {error}: {error_description}".format(**response))
247247

248-
def initiate_device_flow(self, scope=None, **kwargs):
248+
def initiate_device_flow(self, scopes=None, **kwargs):
249249
return self.client.initiate_device_flow(
250-
scope=decorate_scope(scope, self.client_id) if scope else None,
250+
scope=decorate_scope(scopes or [], self.client_id),
251251
**kwargs)
252252

253253
def acquire_token_by_device_flow(

tests/test_application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def test_auth_code(self):
136136
self.assertCacheWorks(result)
137137

138138
def test_device_flow(self):
139-
flow = self.app.initiate_device_flow(scope=CONFIG.get("scope"))
139+
flow = self.app.initiate_device_flow(scopes=CONFIG.get("scope"))
140140
logging.warn(flow["message"])
141141

142142
duration = 30

0 commit comments

Comments
 (0)