MCPcopy
hub / github.com/parse-community/parse-server / afterFind

Method afterFind

src/Adapters/Auth/mfa.js:201–218  ·  view source on GitHub ↗
(authData, options, req)

Source from the content-addressed store, hash-verified

199 throw 'Invalid MFA data';
200 }
201 afterFind(authData, options, req) {
202 if (req.master) {
203 return;
204 }
205 if (this.totp && authData.secret) {
206 return {
207 status: 'enabled',
208 };
209 }
210 if (this.sms && authData.mobile) {
211 return {
212 status: 'enabled',
213 };
214 }
215 return {
216 status: 'disabled',
217 };
218 }
219
220 policy(req, auth) {
221 if (this.sms && auth?.pending && Object.keys(auth).length === 1) {

Calls

no outgoing calls

Tested by

no test coverage detected