SocialAuthentication.NET 1.0.0

dotnet add package SocialAuthentication.NET --version 1.0.0
                    
NuGet\Install-Package SocialAuthentication.NET -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SocialAuthentication.NET" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SocialAuthentication.NET" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SocialAuthentication.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SocialAuthentication.NET --version 1.0.0
                    
#r "nuget: SocialAuthentication.NET, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SocialAuthentication.NET@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SocialAuthentication.NET&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SocialAuthentication.NET&version=1.0.0
                    
Install as a Cake Tool

About Package

This package demonstrates how to integrate OAuth 2.0 authentication with OpenID Providers (OPs) such as Google, Apple, Microsoft, and Facebook. It allows individuals to use single sign-on (SSO) to access relying party sites using OpenID Providers (OPs).

Badges

Stable release Version: NuGet

Nuget Package Downloads: Downloads

Tech Stack

C#, .NET6.0

Requirements

Basic understanding of .NET NuGet packages, c#

Getting Started

Using the .NET CLI

To install this package using the .NET CLI, run the following code:

    dotnet add package FluidProperties --version 1.0.0 

Installation using Visual Studio

First, install NuGet. Then, install CountryRegion from the package manager console:

    NuGet\Install-Package  SocialAuthentication.NET -Version 1.0.10

Finally, import it into the file

   using  SocialAuthentication.NET;

Features

  • OAuth 2.0 Authentication:
    • Google
    • Apple
    • Microsoft
    • Facebook
  • User login and retrieval of user profile.

Sample Usage

   OpenIdConfiguration openConfiguration = new OpenIdConfiguration(token);
  • Output
Type
OpenIdConfiguration

Validate Token with Google

        openConfiguration.googleIdConfiguration.ValidateGoogleToken("your-app-audience");
  • Input
Parameters Type Description
app-audience string Required. The application audience from your registered app on Google Api
  • Output
Type Description
JSON Payload of user information

Validate Token with Microsoft

        string microsoftUser = openConfiguration.microsoftIdConfiguration.ValidateMicrosoftToken("your-app-audience", "your-app-tenantid");
  • Input
Parameters Type Description
app-audience string Required. The application audience from your registered app on Azure AD
app-tenantId string Required. The application tenantId from your registered app on Azure AD
  • Output
Type Description
JSON Payload of user information

Validate Token with Apple

        string appleUser = openConfiguration.appleIdConfiguration.ValidateAppleToken("your-app-audience");
  • Input
Parameters Type Description
app-audience string Required. The application audience from your registered app on Apple
  • Output
Type Description
JSON Payload of user information

Validate Token with Facebook

        string fecebookUser = openConfiguration.facebookIdConfiguration.ValidateFacebookToken("your-app-id", "your-app-secret");
  • Input
Parameters Type Description
app-id string Required. The application identity from your registered app on Meta
app-secret string Required. The application secret from your registered app on Meta

Contibutions

I would appreciate your contributions, complaints, and other feedback.

See contributing.md for ways to get started.

Product 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 was computed.  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 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 229 12/26/2024