UNPKG

feathers-authentication-management

Version:

Adds sign up verification, forgotten password reset, and other capabilities to local feathers-authentication

19 lines (14 loc) 502 B
import makeDebug from 'debug'; import { sanitizeUserForNotifier } from './sanitize-user-for-notifier'; import type { User, Notifier, NotificationType } from '../types'; const debug = makeDebug('authLocalMgnt:notifier'); export async function notify ( notifier: Notifier, type: NotificationType, user: User, notifierOptions?: Record<string, unknown> ): Promise<User> { debug('notifier', type); await notifier(type, sanitizeUserForNotifier(user), notifierOptions || {}); return user; }