An open API service indexing awesome lists of open source software.

https://github.com/scalekit-inc/dotnet-example-apps

.NET example applications - ASP.NET Core SAML and OIDC integration samples
https://github.com/scalekit-inc/dotnet-example-apps

aspnet-core csharp demo dotnet examples oidc saml sample-apps sso

Last synced: 7 months ago
JSON representation

.NET example applications - ASP.NET Core SAML and OIDC integration samples

Awesome Lists containing this project

README

          











Scalekit ASP.NET Example App


Scalekit helps you ship Enterprise Auth in days.

This ASP.NET Core Web API Sample App showcases the Scalekit Official .NET SDK implementation.

## Prerequisites

- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) or later

## Getting Started

1. [Sign up](https://scalekit.com) for a Scalekit account
2. Get your `env_url`, `client_id` and `client_secret` from the Scalekit dashboard

## Project Setup

1. Clone the repository:
```sh
# Clone the repository along with ReactJS submodule
git clone --recursive https://github.com/scalekit-developers/dotnet-example-apps.git
cd dotnet-example-apps
```

2. Install .NET dependencies:
```sh
# Install Scalekit.SDK package
dotnet add package Scalekit.SDK
dotnet add package DotNetEnv
dotnet restore
```

3. Add ReactJS submodule for frontend elements:
```sh
# Build the ReactJS submodule
cd web
npm run build

# Copy all files from React build folder to ASP.NET Core WebAPI wwwroot folder
cp -r ./path-to-react-app/build/* ./path-to-aspnetcore-app/wwwroot/
```

4. Set up environment variables:
```sh
# From the root directory
cp .env.example .env
```

Update `.env` with your Scalekit credentials:
```ini
SCALEKIT_ENV_URL=your_env_url
SCALEKIT_CLIENT_ID=your_client_id
SCALEKIT_CLIENT_SECRET=your_client_secret
```

5. Run the application in development mode:

```sh
# From the root directory
dotnet run

Open http://localhost:5125 to view it in the browser.
```

## Additional Resources
See the [Scalekit API docs](https://docs.scalekit.com) for more information about the API and authentication.