external-account.ts 596 B

12345678910111213141516171819202122
  1. import type { Ref } from './common';
  2. import type { HasObjectId } from './has-object-id';
  3. import type { IUser } from './user';
  4. export const IExternalAuthProviderType = {
  5. ldap: 'ldap',
  6. saml: 'saml',
  7. oidc: 'oidc',
  8. google: 'google',
  9. github: 'github',
  10. facebook: 'facebook',
  11. } as const;
  12. export type IExternalAuthProviderType = typeof IExternalAuthProviderType[keyof typeof IExternalAuthProviderType]
  13. export type IExternalAccount = {
  14. providerType: IExternalAuthProviderType,
  15. accountId: string,
  16. user: Ref<IUser>,
  17. }
  18. export type IExternalAccountHasId = IExternalAccount & HasObjectId