https://github.com/dkackman/deviceoauth2
Limited input device OAuth 2 flow for .NET
https://github.com/dkackman/deviceoauth2
Last synced: 4 months ago
JSON representation
Limited input device OAuth 2 flow for .NET
- Host: GitHub
- URL: https://github.com/dkackman/deviceoauth2
- Owner: dkackman
- Created: 2015-08-30T01:34:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-06-23T01:56:05.000Z (about 4 years ago)
- Last Synced: 2025-04-01T17:18:53.729Z (about 1 year ago)
- Language: HTML
- Homepage: https://dkackman.github.io/DeviceOAuth2/
- Size: 11.4 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DeviceOAuth2
Limited input device OAuth 2 flow for .NET
[NuGet Package](https://www.nuget.org/packages/DeviceOAuth2/)
Tested with [Google Device OAuth2 Flow](https://developers.google.com/identity/protocols/OAuth2ForDevices) and [Facebook Login for Devices Flow](https://developers.facebook.com/docs/facebook-login/for-devices).
Also tested on Windows IoT Core (see example Facebook app).
OAuth flow for scenarios with limited access to input devices or web browsers, like console apps or IoT devices.
IDeviceOAuth2 auth = new DeviceOAuth(EndPointInfo.Google, "scope", "client_id", "client_secret");
auth.PromptUser += (o, e) =>
{
Console.WriteLine("Go to this url on any computer:");
Console.WriteLine(e.VerificationUri);
Console.WriteLine("And enter this code:");
Console.WriteLine(e.UserCode);
};
var token = await auth.Authorize(null);