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:
Mauricio Siu
2026-02-04 08:52:09 -06:00
parent 2b36381f8d
commit 3307f62183

View File

@@ -10,7 +10,6 @@ import { IS_CLOUD } from "../constants";
import { db } from "../db";
import * as schema from "../db/schema";
import { getUserByToken } from "../services/admin";
import { getSSOProviders } from "../services/proprietary/sso";
import {
getWebServerSettings,
updateWebServerSettings,
@@ -50,14 +49,9 @@ const { handler, api } = betterAuth({
if (!settings) {
return [];
}
const providers = await getSSOProviders();
const issuerOrigins = providers.map((provider) => provider.issuer);
return [
...(settings?.serverIp ? [`http://${settings?.serverIp}:3000`] : []),
...(settings?.host ? [`https://${settings?.host}`] : []),
...issuerOrigins,
...(process.env.NODE_ENV === "development"
? [
"http://localhost:3000",