-
Notifications
You must be signed in to change notification settings - Fork 0
Setup Guide
Before running this application, ensure you have:
- .NET 8.0 SDK installed on your machine
- MongoDB instance running (local or cloud)
- Visual Studio 2022 or VS Code (recommended)
- Git for version control
git clone https://github.com/onlyredz/REDZAuthAPI-v1.0.git
cd REDZAuthAPI-v1.0- Open Visual Studio 2022
- Go to
File→Open→Project/Solution - Navigate to the cloned folder and select
REDZAuthApi.sln - Click
Open
- In Solution Explorer, right-click on
appsettings.json - Select
Openor double-click to open - Update the MongoDB connection string:
{
"ConnectionStrings": {
"MongoDB": "mongodb://localhost:27017"
}
}For MongoDB Atlas (cloud), use:
{
"ConnectionStrings": {
"MongoDB": "mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority"
}
}In the same appsettings.json file, update the security settings:
{
"SecuritySettings": {
"AesEncryptionKey": "YOUR_32_CHARACTER_ENCRYPTION_KEY_HERE"
}
}Important: Replace YOUR_32_CHARACTER_ENCRYPTION_KEY_HERE with a secure 32-character encryption key.
To enable Discord notifications, add your webhook URL:
{
"WebhookSettings": {
"DiscordWebhookUrl": "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
}
}- Press
Ctrl + Shift + Bto build the solution - Press
F5to run the application in debug mode - Or press
Ctrl + F5to run without debugging
The API will be available at https://localhost:7001 (or the port shown in the console).
git clone https://github.com/onlyredz/REDZAuthAPI-v1.0.git
cd REDZAuthAPI-v1.0code .Install the following VS Code extensions:
- C# (by Microsoft)
- C# Dev Kit (by Microsoft)
- REST Client (optional, for testing API endpoints)
- Open
appsettings.jsonin VS Code - Update the MongoDB connection string as shown in the Visual Studio section above
Update the security settings in appsettings.json as shown in the Visual Studio section above.
Add your Discord webhook URL as shown in the Visual Studio section above.
Open the integrated terminal in VS Code (Ctrl + `` ) and run:
dotnet restore
dotnet build
dotnet runThe API will be available at https://localhost:7001 (or the port shown in the console).
git clone https://github.com/onlyredz/REDZAuthAPI-v1.0.git
cd REDZAuthAPI-v1.0- Copy
appsettings.Example.jsontoappsettings.json - Edit
appsettings.jsonwith your configuration as shown above
dotnet restore
dotnet build
dotnet run-
MongoDB Connection Failed
- Verify your connection string in
appsettings.json - Ensure MongoDB is running and accessible
- Check network connectivity for cloud instances
- Verify your connection string in
-
Encryption Key Error
- Ensure your AES encryption key is exactly 32 characters
- Update the key in
appsettings.json
-
Webhook Not Working
- Verify your Discord webhook URL is correct
- Check Discord server permissions
- Review console logs for webhook errors
-
HWID Mismatch
- This is expected behavior for security
- Use admin endpoint to reset HWID if legitimate
-
Build Errors
- Ensure .NET 8.0 SDK is installed
- Run
dotnet restoreto restore packages - Check for any missing dependencies
-
Solution Won't Load
- Ensure Visual Studio 2022 is updated
- Install .NET 8.0 workload if prompted
- Try cleaning and rebuilding the solution
-
Debugging Issues
- Check that the startup project is set correctly
- Verify launch settings in
Properties/launchSettings.json
-
IntelliSense Not Working
- Install the C# extension
- Reload VS Code after installation
- Run
dotnet restorein the terminal
-
Debugging Not Working
- Install the C# Dev Kit extension
- Create a launch configuration if needed
After successful setup:
-
Test the API using the Swagger UI at
/swagger - Read the API Reference for endpoint documentation
- Configure your Discord webhook for monitoring
- Review the Security Guide for production considerations
- Check the Configuration Guide for advanced settings