百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

AngularASPNETCoreOAuth

> 前端框架
开源

一个示例项目,演示了使用 Angular、Asp.Net Core 和 IdentityServer4 进行用户身份验证和身份确认

361 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个示例项目,演示了使用 Angular、Asp.Net Core 和 IdentityServer4 进行用户身份验证和身份确认

AngularASPNETCoreOAuth

Sample project based on the blog post demonstrating how to build out an Implicit Grant 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.

Development Environment

  • Visual Studio 2019 Community
  • Visual Studio Code 1.32.3
  • .NET Core SDK 3.1
  • Angular 8
  • IdentityServer4 3.0.1
  • SQL Server Express 2016 LocalDB

Setup

To run the demo:

1. Clone/Fork/Download this repository.

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. AuthServer.Infrastructure> dotnet ef database update --context AppIdentityDbContext AuthServer.Infrastructure> dotnet ef database update --context PersistedGrantDbContext

3. Install Angular CLI if necessary. npm install -g @angular/cli

4. Install Angular SPA dependencies. Spa\oauth-client> npm install

5. Run the Angular CLI dev server to build and run the Angular app. Spa\oauth-client> ng serve

  • Important: This must be running on the default http://localhost:4200

6. Build/Run the AuthServer.sln solution using your preferred method: Visual Studio, VSCode, dotnet CLI.

  • Important: This must be running on http://localhost:5000

7. Build/Run the Resource.Api.sln solution using your preferred method: Visual Studio, VSCode, dotnet CLI.

  • Important: This must be running on http://localhost:5050

8. Point a browser to http://localhost:4200 to access the Angular client.

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.

Contact

[email protected]

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#angularaspnetcoreidentityserver4oauth2

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架