UNPKG

@r1tsu/payload

Version:

11 lines (10 loc) 382 B
export const executeAuthStrategies = async (args)=>{ return args.payload.authStrategies.reduce(async (accumulatorPromise, strategy)=>{ const authUser = await accumulatorPromise; if (!authUser) { return strategy.authenticate(args); } return authUser; }, Promise.resolve(null)); }; //# sourceMappingURL=executeAuthStrategies.js.map