mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(licenses): add license management and user authentication features
- Introduced a new SQL schema for managing licenses and users, including foreign key relationships. - Implemented API routes for license validation, activation, and OTP-based user authentication. - Updated the license creation process to associate licenses with users and handle server IPs. - Added support for the nanoid package to generate unique license keys. - Refactored existing code to improve modularity and maintainability, including the separation of license and stripe-related logic into dedicated API routes. - Enhanced error handling and logging for better debugging and user feedback.
This commit is contained in:
@@ -18,7 +18,6 @@ interface ResendLicenseEmailProps {
|
||||
customerName: string;
|
||||
licenseKey: string;
|
||||
productName: string;
|
||||
expirationDate: Date;
|
||||
requestDate?: Date;
|
||||
}
|
||||
|
||||
@@ -28,15 +27,8 @@ export const ResendLicenseEmail = ({
|
||||
customerName = "John Doe",
|
||||
licenseKey = "1234567890",
|
||||
productName = "Dokploy",
|
||||
expirationDate = new Date(),
|
||||
requestDate = new Date(),
|
||||
}: ResendLicenseEmailProps): React.ReactElement => {
|
||||
const formattedDate = expirationDate.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
});
|
||||
|
||||
const formattedRequestDate = requestDate.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
@@ -75,12 +67,6 @@ export const ResendLicenseEmail = ({
|
||||
<Text style={licenseKeyStyle}>{licenseKey}</Text>
|
||||
</Section>
|
||||
|
||||
<Section style={validitySection}>
|
||||
<Text style={validityText}>
|
||||
🗓️ Valid until: <strong>{formattedDate}</strong>
|
||||
</Text>
|
||||
</Section>
|
||||
|
||||
<Section style={activationSection}>
|
||||
<Heading as="h2" style={h2}>
|
||||
Quick Activation Guide
|
||||
|
||||
Reference in New Issue
Block a user