Files
outline/server/presenters/authenticationProvider.ts
Tom Moor 1a893b0e45 Group sync framework (#11684)
Adds group sync from external authentication providers, allowing team group memberships to be automatically managed based on provider data on sign-in in the future.
2026-03-14 23:02:20 -04:00

22 lines
688 B
TypeScript

import type { AuthenticationProvider } from "@server/models";
/**
* Presents an AuthenticationProvider model for API responses.
*
* @param authenticationProvider - the authentication provider to present.
* @returns a plain object for serialization.
*/
export default function presentAuthenticationProvider(
authenticationProvider: AuthenticationProvider
) {
return {
id: authenticationProvider.id,
name: authenticationProvider.name,
providerId: authenticationProvider.providerId,
createdAt: authenticationProvider.createdAt,
isEnabled: authenticationProvider.enabled,
isConnected: true,
settings: authenticationProvider.settings ?? undefined,
};
}