Scalekit helps you ship Enterprise Auth in days.
This ASP.NET Core Web API Sample App showcases the Scalekit Official .NET SDK implementation.
- .NET 8.0 SDK or later
- Sign up for a Scalekit account
- Get your
env_url,client_idandclient_secretfrom the Scalekit dashboard
- Clone the repository:
# Clone the repository along with ReactJS submodule
git clone --recursive https://github.com/scalekit-developers/dotnet-example-apps.git
cd dotnet-example-apps- Install .NET dependencies:
# Install Scalekit.SDK package
dotnet add package Scalekit.SDK
dotnet add package DotNetEnv
dotnet restore- Add ReactJS submodule for frontend elements:
# 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/- Set up environment variables:
# From the root directory
cp .env.example .envUpdate .env with your Scalekit credentials:
SCALEKIT_ENV_URL=your_env_url
SCALEKIT_CLIENT_ID=your_client_id
SCALEKIT_CLIENT_SECRET=your_client_secret- Run the application in development mode:
# From the root directory
dotnet run
Open http://localhost:5125 to view it in the browser.See the Scalekit API docs for more information about the API and authentication.