MCPcopy Create free account
hub / github.com/parse-community/parse-server / setupMobileOTP

Method setupMobileOTP

src/Adapters/Auth/mfa.js:227–239  ·  view source on GitHub ↗
(mobile)

Source from the content-addressed store, hash-verified

225 }
226
227 async setupMobileOTP(mobile) {
228 const { token, expiry } = await this.sendSMS(mobile);
229 return {
230 save: {
231 pending: {
232 [mobile]: {
233 token,
234 expiry,
235 },
236 },
237 },
238 };
239 }
240
241 async sendSMS(mobile) {
242 if (!/^[+]*[(]{0,1}[0-9]{1,3}[)]{0,1}[-\s\./0-9]*$/g.test(mobile)) {

Callers 1

validateSetUpMethod · 0.95

Calls 1

sendSMSMethod · 0.95

Tested by

no test coverage detected