Visual Studio Team Services Device Flow Authentication for Node.js
vsts-device-flow-auth is a small library that helps your Node.js application's users interactively authenticate to Visual Studio Team Services. It supports both Azure Active Directory-backed (AAD) and Microsoft Account-backed (MSA) Team Services accounts. When the authentication is complete, the Node.js application receives a personal access token to use on the Team Services user's behalf.
Install
$ npm install --save vsts-device-flow-auth
Usage
Create a DeviceFlowAuthenticator
with the URI of the user's Team Services account. You will also need to provide your application's client id and redirect Uri. For
information on how to register an application with Azure, see How to register an app with the v2.0 endpoint
for details.
;;
Call GetDeviceFlowDetails()
to acquire the device_code, verification_url and optional message for the user to authenticate with Team Services.
;
Call WaitForPersonalAccessToken()
to get the token to use on the user's behalf.
;
Below is a short TypeScript example of how to use the package. A complete example can be found in the GitHub repository.
; run;
Support
Support for this project is provided on our GitHub Issue Tracker. You can submit a bug report, a feature request or participate in discussions.
Contributing
To contribute to this project, see the Contributing Guide.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Privacy Statement
The Microsoft Visual Studio Product Family Privacy Statement describes the privacy statement of this software.
License
This extension is licensed under the MIT License. Please see the third-party notices file for additional copyright notices and license terms applicable to portions of the software.