Skip to content

dkackman/DeviceOAuth2

Repository files navigation

DeviceOAuth2

Limited input device OAuth 2 flow for .NET

NuGet Package

Tested with Google Device OAuth2 Flow and Facebook Login for Devices Flow.

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);

About

Limited input device OAuth 2 flow for .NET

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published