Backend Integration
Dotnet

DotNet Core and OpenID Connect - Web App Example

A simple web application in .NET that integrates with the Justpass Identity Server using the OpenID Connect protocol you can try the example here (opens in a new tab).

Prerequisites

Ensure that .Net (opens in a new tab) is installed.

Configure Justpass Identity Server

Configure dotnet libary settings

  • In the WebClient/Program.cs file
    • Make sure to add the scopes ( opt.Scope.Add("openid"); and opt.Scope.Add("profile"); )
    • Then, update the ClientId, ClientSecret and Authority .

Run the Example App

dotnet build
dotnet run

Navigate to localhost. You will rediredcted to Justpass Identity Server directly. Start the OpenID Connect flow. The application receives an ID token that it uses to present user data on the screen, and tokens that could be used in upstream requests to some backend API, to access data on behalf of the user.


2024 © justpass.me