mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
1a893b0e45
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.
22 lines
688 B
TypeScript
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,
|
|
};
|
|
}
|