• Stars
    star
    354
  • Rank 120,042 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample project demonstrating user authentication and identity with Angular, Asp.Net Core and 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

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

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

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]

More Repositories

1

devfolio

A simple, responsive, single-page portfolio and resume for developers built with Bulma, Sass, Font Awesome and Flickity.
JavaScript
505
star
2

CleanAspNetCoreWebApi

Starter project for creating APIs built on ASP.NET Core using clean architecture.
C#
475
star
3

AngularASPNETCore2WebApiAuth

Sample project demonstrating jwt-based authentication with an Angular (v5.2.1) frontend and ASP.NET Core 2 WebApi. Includes both local user registration with .NET Core Identity membership and facebook login scenarios.
C#
472
star
4

AspNetCoreApiStarter

An ASP.NET Core (v2.1) Web API project to quickly bootstrap new projects. Includes Identity, JWT authentication w/ refresh tokens.
C#
354
star
5

ASPNetCoreGraphQL

Sample project demonstrating a GraphQL service built with ASP.NET Core 2.2, Entity Framework Core and graphql-dotnet.
C#
267
star
6

ASPNETCoreDockerMicroservices

Sample project for getting off the ground with ASP.NET Core, Docker and Microservices based on the tutorial: https://fullstackmark.com/post/12/get-started-building-microservices-with-asp.net-core-and-docker-in-visual-studio-code
C#
167
star
7

CleanArchitecture

Example from a post exploring CleanArchitecture: https://fullstackmark.com/post/11/better-software-design-with-clean-architecture
C#
135
star
8

VueASPNETCore2WebApiAuth

Sample project demonstrating jwt-based authentication with an Vue.js (v2.5.13) frontend and ASP.NET Core 2 WebApi. Includes both local user registration with .NET Core Identity membership and facebook login scenarios.
C#
111
star
9

fullstack-jobs

Real(ish) demo using Angular with ASP.NET Core GraphQL and IdentityServer.
C#
88
star
10

AngularASPNETCoreAuthentication

Complete user authentication example with Angular 4 and ASP.NET Core 1.0. There is a new version of this repo based on ASP.NET Core 2.0. Please see https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login for more information.
JavaScript
85
star
11

ApiIntegrationTestSamples

Demo project containing end-to-end, in-memory integration tests in ASP.NET Core 2.1
C#
65
star
12

open-standup-mobile

C#
16
star
13

XamFormsReactiveUI

A simple vocabulary app made with Xamarin Forms and ReactiveUI
C#
11
star
14

ASPNetCoreDIAndUnitTesting

C#
10
star
15

XamFormsWebSockets

C#
9
star
16

GetStartedAngularASPNetCore

JavaScript
7
star
17

dotnetCoreTDD

C#
5
star
18

web-api-scraper

C#
1
star
19

dotnet-git-hooks

This repo contains a sample project as part of a tutorial explaining how to set up Git hooks with Husky.Net. The tutorial shows you how to use Husky to add a couple of hooks in a .NET project to run the dotnet format and dotnet test commands during the Git workflow.
C#
1
star