mirror of
				https://github.com/kyantech/Palmr.git
				synced 2025-11-03 21:43:20 +00:00 
			
		
		
		
	feat: implement OIDC authentication and enhance user management features
- Introduced OIDC authentication support with new OIDCService, controller, and routes for handling OIDC login and callback processes. - Updated user management functionalities to integrate OIDC, allowing users to authenticate via external providers. - Enhanced localization files to include new strings related to OIDC authentication across multiple languages. - Refactored existing components and hooks to support the new authentication flow, improving user experience during login and registration processes. - Added new UI components for handling OIDC login and callback, ensuring a seamless integration with the existing application structure.
This commit is contained in:
		@@ -122,6 +122,61 @@ const defaultConfigs = [
 | 
			
		||||
    value: "3600",
 | 
			
		||||
    type: "number",
 | 
			
		||||
    group: "security",
 | 
			
		||||
  },
 | 
			
		||||
  // OIDC SSO Configurations
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcEnabled",
 | 
			
		||||
    value: "false",
 | 
			
		||||
    type: "boolean",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcIssuerUrl",
 | 
			
		||||
    value: "",
 | 
			
		||||
    type: "string",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcClientId",
 | 
			
		||||
    value: "",
 | 
			
		||||
    type: "string",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcClientSecret",
 | 
			
		||||
    value: "",
 | 
			
		||||
    type: "string",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcRedirectUri",
 | 
			
		||||
    value: "",
 | 
			
		||||
    type: "string",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcScope",
 | 
			
		||||
    value: "openid profile email",
 | 
			
		||||
    type: "string",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcAutoRegister",
 | 
			
		||||
    value: "true",
 | 
			
		||||
    type: "boolean",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "oidcAdminEmailDomains",
 | 
			
		||||
    value: "",
 | 
			
		||||
    type: "string",
 | 
			
		||||
    group: "oidc",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "serverUrl",
 | 
			
		||||
    value: "http://localhost:3333",
 | 
			
		||||
    type: "string",
 | 
			
		||||
    group: "general",
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
@@ -133,7 +188,6 @@ async function main() {
 | 
			
		||||
  let skippedCount = 0;
 | 
			
		||||
 | 
			
		||||
  for (const config of defaultConfigs) {
 | 
			
		||||
    // Check if configuration already exists
 | 
			
		||||
    const existingConfig = await prisma.appConfig.findUnique({
 | 
			
		||||
      where: { key: config.key },
 | 
			
		||||
    });
 | 
			
		||||
@@ -144,7 +198,6 @@ async function main() {
 | 
			
		||||
      continue;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Only create if it doesn't exist
 | 
			
		||||
    await prisma.appConfig.create({
 | 
			
		||||
      data: config,
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user