(authData, options, req)
| 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) { |
no outgoing calls
no test coverage detected