Skip to content

Commit 0672c72

Browse files
authored
Mention how to customize the device flow block time
1 parent d133447 commit 0672c72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sample/device_flow_sample.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
# Ideally you should wait here, in order to save some unnecessary polling
5757
# input("Press Enter after you successfully login from another device...")
5858
result = app.acquire_token_by_device_flow(flow) # By default it will block
59+
# You can follow this instruction to shorten the block time
60+
# https://msal-python.readthedocs.io/en/latest/#msal.PublicClientApplication.acquire_token_by_device_flow
61+
# or you may even turn off the blocking behavior,
62+
# and then keep calling acquire_token_by_device_flow(flow) in your own customized loop.
5963

6064
if "access_token" in result:
6165
print(result["access_token"])

0 commit comments

Comments
 (0)