{"id":20906640,"url":"https://github.com/authress/csharp-starter-kit","last_synced_at":"2025-12-28T22:30:25.444Z","repository":{"id":181262143,"uuid":"666449147","full_name":"Authress/csharp-starter-kit","owner":"Authress","description":"The Authress Starter Kit for C#.Net. Includes Authentication, Authorization, user identity and role management","archived":false,"fork":false,"pushed_at":"2024-02-21T10:48:30.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-19T14:38:18.528Z","etag":null,"topics":["api","asp-net","authentication","authorization","authress","backend","csharp","dotnet","mvc","security","service","starter-kit"],"latest_commit_sha":null,"homepage":"https://authress.io","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Authress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-14T14:44:18.000Z","updated_at":"2023-07-14T16:54:50.000Z","dependencies_parsed_at":"2024-11-18T13:44:53.602Z","dependency_job_id":"8e000773-7c0f-4ff6-8047-7fe7194290a9","html_url":"https://github.com/Authress/csharp-starter-kit","commit_stats":null,"previous_names":["authress/csharp-starter-kit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fcsharp-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fcsharp-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fcsharp-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Authress%2Fcsharp-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Authress","download_url":"https://codeload.github.com/Authress/csharp-starter-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243300643,"owners_count":20269259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","asp-net","authentication","authorization","authress","backend","csharp","dotnet","mvc","security","service","starter-kit"],"created_at":"2024-11-18T13:34:27.553Z","updated_at":"2025-12-28T22:30:25.415Z","avatar_url":"https://github.com/Authress.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp id=\"main\" align=\"center\"\u003e\n  \u003cimg src=\"https://authress.io/static/images/linkedin-banner.png\" alt=\"Authress media banner\"\u003e\n\u003c/p\u003e\n\n# Authress Starter Kit: C# + .NET (ASP MVC)\nThe C# Starter Kit for Authress includes Authentication, Authorization, user identity and role management\n\nThis is an example built specifically for using Authress with Typescript \u0026 Express.\n\n## How to use this repository\n\n### Install Dotnet\nThis repository is set up to use Dotnet 6.0 for its LTS support. It's easy to also switch this repo to using 7.0 instead, just making some quick adjustments to the following installs:\n\nFor dotnet 6.0:\n```sh\nsudo apt install dotnet-sdk-6.0 dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-runtime-deps-6.0 aspnetcore-runtime-6.0\n```\n\nFor dotnet 7.0:\n```sh\nsudo apt install dotnet-sdk-7.0 dotnet-hostfxr-7.0 dotnet-runtime-7.0 dotnet-runtime-deps-7.0 aspnetcore-runtime-7.0\n```\nAlso make sure to switch the version specified in the `launch.json` and in the `AuthressStarterKit.csproj` to 7.0 before running `dotnet restore`.\n\n### Configure the example\n\nUpdate `src/AuthressConfiguration.cs`:\n* `AuthenticationProviderOAuthIssuerUrl` - to point to your JWT Authentication OAuth 2 provider's Issuer URL. If you are using Authress for development this is: `login.authress.io`, and for production it will be your [custom domain url](https://authress.io/app/#/settings?focus=domain).\n* `AuthressApiHostUrl` - to point to your Authress account [Host API URL](https://authress.io/app/#/api).\n* `ServiceClientAccessKey` - Create and configure an Authress Service Client Access Token. Generate one at [Authress service clients](https://authress.io/app/#/settings?focus=clients), or see the [service client access key documentation](https://authress.io/knowledge-base/docs/authorization/service-clients).\n\n### Running the example:\n\n```sh\ncd src\ndotnet restore\ndotnet build\ndotnet run\n```\n\nThe service will then be running on `http://localhost:5000` by default\n* And then use `curl` or `postman` to hit any of the endpoints.\n* Grab your AUTHORIZATION_TOKEN from https://authress.io/app/#/api\n\n```sh\ncurl -XGET http://localhost:5000/example-resource -H\"Authorization: Bearer AUTHORIZATION_TOKEN\"\n```\n\n## See the code\nIf you just want to see the code, it's available right here.\n\n* [Program.cs](./src/Program.cs) - Boilerplate to run your service\n* [AuthressConfiguration](./src/AuthressConfiguration.cs) - Configuration for Authress\n\nThere are three controllers, they all use Authress in some way to authorize the request and check the users permissions:\n\u003c!-- * [Accounts](./src/accounts/accountController.ts) - General creating an account and setting up SSO --\u003e\n* [ExampleResourceController](./src/ExampleResourceController.cs) - How to secure a reason creating access and updating it\n\u003c!-- * [Users](./src/users/usersController.ts) - Managing users for the whole account. --\u003e\n\n## Details\n\n### The middleware\nThe important part of the integration is to get the userId and Authress client to authorize the user. This is done by adding a middleware to parse out the caller, and one line in the service to validate this.\n\n* [Authentication Middleware](.src/Program.cs)\n\n## Troubleshooting issues\n\n`Microsoft.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10501: Signature validation failed. Unable to match key:`\n\nThere is a current bug with the implementation in ASP.NET MVC JWT Bearer token verification not accepting our more secure EdDSA tokens. The full extent of the issue is available in this [GitHub Issue](https://github.com/Authress/authress-sdk.cs/issues/20). For now, please just reach out to us at [Authress Support](https://authress.io/app/#/support), and we'll make a quick fix for you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthress%2Fcsharp-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthress%2Fcsharp-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthress%2Fcsharp-starter-kit/lists"}