AuthScape

Docs

Third-Party Services Overview

Overview of all third-party service integrations available in AuthScape.

AuthScape provides integrations with various third-party services for email, payments, cloud storage, AI, and more.

Available Integrations

Email Services

ProviderStatusFeatures
SendGridActiveTransactional email, templates, analytics
MailgunActiveTransactional email, webhooks
SMTP (MailKit)ActiveGeneric SMTP support
Smtp2GoActiveSMTP relay service
Azure CommunicationPendingAzure-native email

Payment Processing

ProviderStatusFeatures
Stripe PaymentsActiveOne-time payments, saved cards
Stripe ConnectActiveMarketplace payments
Stripe SubscriptionsActiveRecurring billing

Cloud Services

ProviderStatusFeatures
Azure StorageActiveBlob storage, file management
Azure OpenAIActiveGPT models via Azure
Azure Document IntelligenceActiveDocument processing
Azure Web AppActiveDomain/SSL management

AI Services

ProviderStatusFeatures
OpenAI / ChatGPTActiveText generation, translation
Azure OpenAIActiveEnterprise AI integration

Location Services

ProviderStatusFeatures
Google MapsActiveAddress autocomplete, geocoding
Google PlacesActivePlace search, details

OAuth Providers

AuthScape supports 20+ OAuth providers for social login:

  • Adobe, Amazon, Apple, Asana, Autodesk
  • Basecamp, BattleNet, Coinbase
  • Discord, Dropbox, Fitbit
  • GitHub, HubSpot, LinkedIn
  • MailChimp, Notion, Patreon
  • PayPal, Slack, Spotify

Configuration Architecture

AuthScape uses a provider factory pattern for services:

csharp
// Startup.cs
services.AddEmailService(Configuration, "Email");
services.AddStripeServices(Configuration);
services.AddAzureServices(Configuration);

appsettings.json Structure

json
{
"AppSettings": {
"Stripe": {
"SecretKey": "sk_test_xxx",
"PublishableKey": "pk_test_xxx",
"SigningSecret": "whsec_xxx"
},
"Storage": {
"AzureConnectionString": "DefaultEndpointsProtocol=https;...",
"BaseUri": "https://yourstorage.blob.core.windows.net",
"UserProfileContainer": "profiles"
},
"OpenAI": {
"APIKey": "sk-xxx"
}
},
"Email": {
"DefaultFromEmail": "noreply@yourapp.com",
"DefaultFromName": "Your App",
"DefaultProvider": "SendGrid",
"Providers": {
"SendGrid": {
"Enabled": true,
"ApiKey": "SG.xxx"
},
"Mailgun": {
"Enabled": false,
"ApiKey": "xxx",
"Settings": {
"Domain": "mail.yourapp.com",
"BaseUrl": "https://api.mailgun.net/v3"
}
}
}
}
}

Using the Email Service

The email service uses a factory pattern to support multiple providers:

csharp
public interface IEmailService
{
Task<IEmailResponse> SendEmailAsync(IEmailMessage message, CancellationToken ct = default);
Task<IEmailResponse> SendEmailAsync(IEmailMessage message, string providerName, CancellationToken ct = default);
}
// Usage in controller
public class NotificationController : ControllerBase
{
private readonly IEmailService _emailService;
[HttpPost("send")]
public async Task<IActionResult> SendNotification([FromBody] EmailRequest request)
{
var message = new EmailMessage
{
To = new[] { new EmailRecipient(request.Email, request.Name) },
Subject = request.Subject,
HtmlContent = request.Body
};
var result = await _emailService.SendEmailAsync(message);
if (result.Success)
return Ok(new { messageId = result.MessageId });
else
return BadRequest(new { error = result.ErrorMessage });
}
}

Service Registration

Email Service

csharp
// In Startup.cs or Program.cs
services.AddEmailService(Configuration, "Email");

Stripe Services

csharp
services.AddScoped<IStripePayService, StripePayService>();
services.AddScoped<IStripeConnectService, StripeConnectService>();
services.AddScoped<IStripeSubscriptionService, StripeSubscriptionService>();

Azure Services

csharp
services.AddScoped<IAzureWebAppService, AzureWebAppService>();
services.AddScoped<IAzureDocumentIntelligenceService, AzureDocumentIntelligenceService>();

OpenAI Services

csharp
services.AddScoped<IOpenAIService, OpenAIService>();
services.AddScoped<IAzureOpenAIService, AzureOpenAIService>();

Error Handling

All services return structured responses:

csharp
public interface IEmailResponse
{
bool Success { get; }
string ProviderName { get; }
string? MessageId { get; }
string? ErrorMessage { get; }
int? StatusCode { get; }
}

Best Practices

  1. Use environment variables - Don't commit API keys to source control
  2. Configure fallback providers - Set up multiple email providers
  3. Handle failures gracefully - Log errors and notify admins
  4. Use webhooks - For payment confirmations and email events
  5. Monitor usage - Track API calls and costs

Next Steps