Skip to content

NewOrbit/MockOidcApp

Repository files navigation

MockOIDCApp

This is a demonstration app that accompanies this blog post on the NewOrbit Blog. It is used to demonstrate how a mock OIDC service can be used to mock authentication in local development and testing.

Running the Demo

The demo is written in C# and Typescript. To run the system:

  1. Open the repo in VSCode
  2. Ensure that pre-requisite software is installed which can be done either by installing them locally or using DevContainers in VsCode
    1. Dotnet SDK v9
    2. Node 18
    3. Install recommended VSCode extensions
    4. Install the dotnet development certificate by running the following command dotnet dev-certs https --trust
  3. Run the solution:
    1. Via VSCode by opening the MockOidcApp.AppHost/Program.cs file and using the Play button that appears in the top left corner
      • You may need to use the ".NET: Close Solution" and ".NET: Open Solution" commands in VSCode to enable this to work
    2. Via Command line from the MockOidcApp.AppHost directory: dotnet run
  4. Navigate to http://localhost:5100
  5. Use the Login and Logout button to observe how the demo application interacts with a Mock identity service and displays weather forecasts when logged in.
    • The demo is setup to have the following credentials:

Running integration tests

As described in the blog post there are integration tests provided, to run these:

  1. Open a terminal in the MockOidcApp.SpaIntegrationTests directory
  2. Run npx playwright test

Running GitHub actions

A sample Github action workflow is provided to run the integration tests in Github actions. Sadly you cannot test these locally using act due to an issue relating to the dev container bind mount. It may work when you try it though, you can attempt to run them using these instructions:

  1. Open a Terminal in the root of the Repository
  2. Run act

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •