MCPcopy Index your code
hub / github.com/parse-community/parse-server / validateUpdate

Method validateUpdate

src/Adapters/Auth/mfa.js:185–200  ·  view source on GitHub ↗
(authData, _, req)

Source from the content-addressed store, hash-verified

183 return saveResponse;
184 }
185 async validateUpdate(authData, _, req) {
186 if (req.master) {
187 return;
188 }
189 if (authData.mobile && this.sms) {
190 if (!authData.token) {
191 throw 'MFA is already set up on this account';
192 }
193 return this.confirmSMSOTP(authData, req.original.get('authData')?.mfa || {});
194 }
195 if (this.totp) {
196 await this.validateLogin({ token: authData.old }, null, req);
197 return this.validateSetUp(authData);
198 }
199 throw 'Invalid MFA data';
200 }
201 afterFind(authData, options, req) {
202 if (req.master) {
203 return;

Callers 3

authDataValidatorFunction · 0.45
linkedIn.spec.jsFile · 0.45

Calls 4

confirmSMSOTPMethod · 0.95
validateLoginMethod · 0.95
validateSetUpMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected