Skip to content

Example project using Aspire with a Next.js (React) frontend, an ASP.NET Core backend, and Keycloak for authentication.

License

Notifications You must be signed in to change notification settings

jonathanpotts/AspireNextjsKeycloak

Repository files navigation

AspireNextjsKeycloak

Example project using Aspire with a Next.js (React) frontend, an ASP.NET Core backend, and Keycloak for authentication.

Requirements

This project requires the following:

Running

To run this project, do the following:

  1. Start Docker Desktop or Podman if it is not already running
  2. Use one of the following:
    • .NET CLI: In the AspireNextjsKeycloak.AppHost directory, run dotnet run and then open the dashboard using the URL output to the console.
    • Aspire CLI: In the repo directory, run aspire run and then open the dashboard using the URL output to the console.
    • Code Editor/IDE: Use the run command in a code editor or IDE such as Visual Studio Code.

The default users are:

Username Password
alice alice
bob bob

Projects

AspireNextjsKeycloak.AppHost

An Aspire AppHost which handles orchestration and hosts the Aspire dashboard.

Uses:

AspireNextjsKeycloak.ApiService

An ASP.NET Core minimal APIs backend which requires authorization from Keycloak.

Uses:

AspireNextjsKeycloak.Web

A Next.js frontend using the App Router and React Server Components that authenticates the user and displays data from the backend.

Uses:

Notice

Please do not use the realm data from this repository in production as the secrets are exposed to the public.

About

Example project using Aspire with a Next.js (React) frontend, an ASP.NET Core backend, and Keycloak for authentication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •