mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-27 05:58:46 +00:00
refactor(auth): remove unused SSO provider retrieval logic
- Deleted the import statement for `getSSOProviders` and the associated logic for fetching issuer origins from SSO providers. - This cleanup improves code clarity by removing unnecessary dependencies and streamlining the trusted origins configuration.
This commit is contained in:
@@ -10,7 +10,6 @@ import { IS_CLOUD } from "../constants";
|
|||||||
import { db } from "../db";
|
import { db } from "../db";
|
||||||
import * as schema from "../db/schema";
|
import * as schema from "../db/schema";
|
||||||
import { getUserByToken } from "../services/admin";
|
import { getUserByToken } from "../services/admin";
|
||||||
import { getSSOProviders } from "../services/proprietary/sso";
|
|
||||||
import {
|
import {
|
||||||
getWebServerSettings,
|
getWebServerSettings,
|
||||||
updateWebServerSettings,
|
updateWebServerSettings,
|
||||||
@@ -50,14 +49,9 @@ const { handler, api } = betterAuth({
|
|||||||
if (!settings) {
|
if (!settings) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const providers = await getSSOProviders();
|
|
||||||
const issuerOrigins = providers.map((provider) => provider.issuer);
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
...(settings?.serverIp ? [`http://${settings?.serverIp}:3000`] : []),
|
...(settings?.serverIp ? [`http://${settings?.serverIp}:3000`] : []),
|
||||||
...(settings?.host ? [`https://${settings?.host}`] : []),
|
...(settings?.host ? [`https://${settings?.host}`] : []),
|
||||||
...issuerOrigins,
|
|
||||||
...(process.env.NODE_ENV === "development"
|
...(process.env.NODE_ENV === "development"
|
||||||
? [
|
? [
|
||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
|
|||||||
Reference in New Issue
Block a user