Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.09k stars 1.2k forks source link

[Identity] DeviceCodeCredential: Add a timeout optional parameter. #11670

Closed sadasant closed 3 years ago

sadasant commented 4 years ago

Python currently offers a way to timeout the authentication request. We should investigate if we can add the same feature.

sadasant commented 4 years ago

Here's what I know so far,

DeviceCodeCredential (DCC) uses PublicClientApplication, from @azure/msal-node. PublicClientApplication extends ClientApplication, which has at least two distinct notions of a timeout:

I think that configuration makes sense to work with, but I might not have enough context.

sadasant commented 4 years ago

I had a conversation with @jonathandturner about this feature and how Python approaches it (here) and, since this issue relates to MSAL and to the work he's already doing, we decided on assigning this back to him! Thank you, Jonathan!

sophiajt commented 4 years ago

Request on MSAL for reference: https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/2494

sadasant commented 3 years ago

Turns out this is an inconsistency in Python. In JS it can be resolved with the abort signal. I'll close this for now.