- @DarkElfes
- @Pitbmak University email account
ApiProject - is example of RESTful API with using JWT and OIDC authentication.
For theme of porject will be chosed shop of "Phone cases" (but emphasis was more on auth and not all backend functionality was used on frontend).
- Clone the repository
git clone https://github.com/DarkElfes/ApiProject- Install the dependencies:
winget install Microsoft.DotNet.SDK.9For using Google Auth you need to create OAuth 2.0 Client ID in Google Cloud Console.
Then you need to add your ClientId and ClientSecret to the appsettings.json file.
"OIDC": {
"Google": {
"ClientId": "YOUR_CLIENT",
"ClientSecret": "YOUR_SECRET",
"RedirectUri": "https://localhost:7097/auth/google/oidc-callback"
}
}For using powershell scripts you need to allow scripts execution:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUserThen you can start the projects with the following command:
- For run Frontent and Backend projects:
.\backend-frontend.ps1- For run only backend project:
.\backend-only.ps1In web project console you find the link to the frontend or click here: https://localhost:7097
But for backend you need add /scalar/v1 path to link or click here: https://localhost:7236/scalar/v1 for using scalar docs.
- Clean architecture with using CQRS pattern (MediatR library)
(But i find the best for me - Vertical Slice Architecture)
- JWT and OpenIDConnect (Only Google) authentication
- Scalar documentation with OpenApi
- Using Entity Framework Core with SQLite
- Fontend with Blazor WebAssembly (MudBlazor UI)
Link to Postman Documentation
