{"repo":"Hawxy/Fga.Net","free":true,"listed":false,"github":"https://github.com/Hawxy/Fga.Net","clone":"git clone https://github.com/Hawxy/Fga.Net.git","description":"OpenFGA & Auth0 FGA for ASP.NET Core + Worker Services","language":"C#","stars":40,"topics":["auth0","aspnetcore","authentication","authorization","fga","openfga","auth","okta-authentication"],"license":"Apache-2.0","category":"auth-billing-email","readme_excerpt":"OpenFGA & Auth0 FGA for ASP.NET Core + Worker Services Packages Fga.Net.DependencyInjection : Provides dependency injection/configuration extensions for OpenFga.Sdk Fga.Net.AspNetCore : Authorization middleware to perform FGA checks for inbound requests. Getting Started This package is compatible with the OSS OpenFGA as well as the managed Auth0 FGA service. Please ensure you have a basic understanding of how FGA works before continuing: OpenFGA Docs or Auth0 FGA Docs ASP.NET Core Setup This tutorial assumes you have authentication setup within your project, such as JWT bearer authentication via Auth0. Install Fga.Net.AspNetCore from Nuget before continuing. Auth0 FGA Ensure you have a Store ID, Client ID, and Client Secret ready from How to get your API keys. 1. Add your StoreId , ClientId and ClientSecret to your application configuration, ideally via the dotnet secrets manager. 2. Add the following code to your ASP.NET Core services configuration: The ConfigureAuth0Fga extension will configure the client to work with the Auth0 US environment. An environment selector will be added as additional regions come online. OpenFGA 1. Add the FGA ApiUrl & StoreId to your application configuration. 2. Add the following code to your ASP.NET Core configuration: Authentication can be added to OpenFGA connections via the relevant extensions: Authorization Policy Setup Your authorization policy should be configured with RequireAuthenticatedUser and AddFgaRequirement at minimum: A constant","default_branch":null,"files":null,"tree":[],"storefront":"/r/Hawxy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Hawxy/Fga.Net/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}