{"id":18842007,"url":"https://github.com/mmacneil/angularaspnetcoreoauth","last_synced_at":"2025-04-05T07:05:02.115Z","repository":{"id":34536956,"uuid":"175104392","full_name":"mmacneil/AngularASPNETCoreOAuth","owner":"mmacneil","description":"Sample project demonstrating user authentication and identity with Angular, Asp.Net Core and IdentityServer4","archived":false,"fork":false,"pushed_at":"2023-01-07T03:47:21.000Z","size":3691,"stargazers_count":353,"open_issues_count":31,"forks_count":229,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-29T06:05:21.779Z","etag":null,"topics":["angular","aspnetcore","identityserver4","oauth2","openid-connect"],"latest_commit_sha":null,"homepage":"https://fullstackmark.com/post/21/user-authentication-and-identity-with-angular-aspnet-core-and-identityserver","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmacneil.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}},"created_at":"2019-03-12T00:22:14.000Z","updated_at":"2025-03-23T15:43:24.000Z","dependencies_parsed_at":"2023-01-15T07:45:47.421Z","dependency_job_id":null,"html_url":"https://github.com/mmacneil/AngularASPNETCoreOAuth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmacneil%2FAngularASPNETCoreOAuth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmacneil%2FAngularASPNETCoreOAuth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmacneil%2FAngularASPNETCoreOAuth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmacneil%2FAngularASPNETCoreOAuth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmacneil","download_url":"https://codeload.github.com/mmacneil/AngularASPNETCoreOAuth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"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":["angular","aspnetcore","identityserver4","oauth2","openid-connect"],"created_at":"2024-11-08T02:53:21.609Z","updated_at":"2025-04-05T07:05:02.082Z","avatar_url":"https://github.com/mmacneil.png","language":"C#","readme":"# AngularASPNETCoreOAuth\nSample project based on \u003ca href=\"https://fullstackmark.com/post/21/user-authentication-and-identity-with-angular-aspnet-core-and-identityserver\"\u003ethe blog post\u003c/a\u003e demonstrating how to build out an \u003ca href=\"https://oauth.net/2/grant-types/implicit/\" target=\"_blank\"\u003eImplicit Grant\u003c/a\u003e OAuth flow utilizing OAuth2/OpenID Connect protocols implementing IdentityServer4 as our OpenID Connect Provider and then using it to authenticate an Angular SPA client to authorize access to an independent ASP.NET Core Web API.\n\n\u003cimg src=\"https://fullstackmark.com/img/posts/21/open-id-connect-oauth-flow-angular-aspnet-core-identityserver.gif\" /\u003e\n \n## Development Environment\n- Visual Studio 2019 Community\n- Visual Studio Code 1.32.3 \n- .NET Core SDK 3.1 \n- Angular 8\n- IdentityServer4 3.0.1\n- SQL Server Express 2016 LocalDB\n\n## Setup\n\n#### To run the demo:\n\n**1.** Clone/Fork/Download this repository.\n\n**2.** Create the database on your SQL Server Express LocalDB by using the dotnet cli to run the migrations from within the AuthServer.Infrastrucuture project folder.\n\u003cpre\u003e\u003ccode\u003eAuthServer.Infrastructure\u003e dotnet ef database update --context AppIdentityDbContext\u003c/code\u003e\u003c/pre\u003e\n\u003cpre\u003e\u003ccode\u003eAuthServer.Infrastructure\u003e dotnet ef database update --context PersistedGrantDbContext\u003c/code\u003e\u003c/pre\u003e\n\n**3.** Install Angular CLI if necessary. `npm install -g @angular/cli`\n\n**4.** Install Angular SPA dependencies.\n\u003cpre\u003e\u003ccode\u003eSpa\\oauth-client\u003e npm install\u003c/code\u003e\u003c/pre\u003e\n\n**5.** Run the Angular CLI dev server to build and run the Angular app.\n\u003cpre\u003e\u003ccode\u003eSpa\\oauth-client\u003e ng serve\u003c/code\u003e\u003c/pre\u003e\n  - **Important:** This must be running on the default http://localhost:4200\n\n**6.** Build/Run the `AuthServer.sln` solution using your preferred method: Visual Studio,  VSCode, dotnet CLI.\n  - **Important:** This must be running on http://localhost:5000\n\n**7.** Build/Run the `Resource.Api.sln` solution using your preferred method: Visual Studio,  VSCode, dotnet CLI.\n  - **Important:** This must be running on http://localhost:5050\n\n**8.** Point a browser to `http://localhost:4200` to access the Angular client.\n\n**9.** Use the *Signup* and *Login* functions to perform the authentication flow, then try and access the *Top Secret Area* to hit the protected ASP.NET Core Web API.\n\n## Contact\nmark@fullstackmark.com\n \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmacneil%2Fangularaspnetcoreoauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmacneil%2Fangularaspnetcoreoauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmacneil%2Fangularaspnetcoreoauth/lists"}