(mobile)
| 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)) { |