Skip to content
Snippets Groups Projects
Unverified Commit 5294fed5 authored by Martin Schoeler's avatar Martin Schoeler Committed by GitHub
Browse files

chore: remove meteor from oauth (#35303)

parent 40ab1c4d
No related branches found
No related tags found
No related merge requests found
import { useEffect } from 'react';
import { CustomOAuth } from '../../../app/custom-oauth/client/CustomOAuth';
import { loginServices } from '../../lib/loginServices';
export const useCustomOAuth = () => {
useEffect(() => {
loginServices.onLoad((services) => {
for (const service of services) {
if (!('custom' in service && service.custom)) {
continue;
}
new CustomOAuth(service.service, {
serverURL: service.serverURL,
authorizePath: service.authorizePath,
scope: service.scope,
});
}
});
}, []);
};
import { Meteor } from 'meteor/meteor';
import { CustomOAuth } from '../../app/custom-oauth/client/CustomOAuth';
import { loginServices } from '../lib/loginServices';
Meteor.startup(() => {
loginServices.onLoad((services) => {
for (const service of services) {
if (!('custom' in service && service.custom)) {
continue;
}
new CustomOAuth(service.service, {
serverURL: service.serverURL,
authorizePath: service.authorizePath,
scope: service.scope,
});
}
});
});
......@@ -4,7 +4,6 @@ import './afterLogoutCleanUp';
import './appRoot';
import './audit';
import './callbacks';
import './customOAuth';
import './deviceManagement';
import './e2e';
import './forceLogout';
......
......@@ -19,6 +19,7 @@ import { useAnalyticsEventTracking } from '../../hooks/useAnalyticsEventTracking
import { useLoadRoomForAllowedAnonymousRead } from '../../hooks/useLoadRoomForAllowedAnonymousRead';
import { useNotifyUser } from '../../hooks/useNotifyUser';
import { appLayout } from '../../lib/appLayout';
import { useCustomOAuth } from '../../sidebar/hooks/useCustomOAuth';
import { useRedirectToSetupWizard } from '../../startup/useRedirectToSetupWizard';
const AppLayout = () => {
......@@ -46,6 +47,7 @@ const AppLayout = () => {
useGitHubEnterpriseAuth();
useDrupal();
useDolphin();
useCustomOAuth();
useCorsSSLConfig();
const layout = useSyncExternalStore(appLayout.subscribe, appLayout.getSnapshot);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment