LineAuthentication 2.0.0
dotnet add package LineAuthentication --version 2.0.0
NuGet\Install-Package LineAuthentication -Version 2.0.0
<PackageReference Include="LineAuthentication" Version="2.0.0" />
paket add LineAuthentication --version 2.0.0
#r "nuget: LineAuthentication, 2.0.0"
// Install LineAuthentication as a Cake Addin #addin nuget:?package=LineAuthentication&version=2.0.0 // Install LineAuthentication as a Cake Tool #tool nuget:?package=LineAuthentication&version=2.0.0
LineAuthentication for ASP.NET Core
LineAuthentication provides LINE authentication like Twitter, Facebook, and other external login. Supports LINE Profile+.
Support Platforms
- .NET 6+
How to use
It is very easy to use, just call AddLine()
which is an extension method of AuthenticationBuilder
. This API style is same of other external login, so you never confuse.
services
.AddAuthentication()
.AddLine(options =>
{
options.ClientId = Configuration["Authentication:Line:ChannelId"];
options.ClientSecret = Configuration["Authentication:Line:ChannelSecret"];
});
To access the LINE Profile+, add an authorization scope and extract the data from the JSON payload.
services
.AddAuthentication()
.AddLine(options =>
{
// ...
// Add authorization scopes
options.Scope.Add("real_name");
options.Scope.Add("gender");
options.Scope.Add("birthdate");
options.Scope.Add("address");
options.Scope.Add("phone");
options.Scope.Add("email");
// Map JSON payload to claims
options.ClaimActions.MapJsonKey(ClaimTypes.Email, "email");
// Access entire JSON payload
options.Events.OnCreatingTicket = context =>
{
var json = context.User.GetRawText();
return Task.CompletedTask;
};
});
Installation
dotnet add package LineAuthentication
LINE login docs
License
This library is provided under Apache License 2.0.
Authors
Tsubasa Yoshino is software developer in Tokyo, Japan. Awarded Microsoft MVP (Azure) since October, 2016. He's the original owner of this project.
Takaaki Suzuki is software developer in Fukui, Japan. Awarded Microsoft MVP (C#) since July, 2012. He's a contributer who led the .NET Standard / .NET 5 and LINE Profile+ support.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.