(username, password)
| 5054 | } |
| 5055 | |
| 5056 | async function requestLoginOtp(username, password) { |
| 5057 | try { |
| 5058 | await request({ |
| 5059 | method: 'POST', |
| 5060 | url: 'http://localhost:8378/1/login', |
| 5061 | headers: mfaHeaders, |
| 5062 | body: JSON.stringify({ |
| 5063 | username, |
| 5064 | password, |
| 5065 | authData: { mfa: { token: 'request' } }, |
| 5066 | }), |
| 5067 | }); |
| 5068 | } catch (_err) { |
| 5069 | // Expected: adapter throws "Please enter the token" |
| 5070 | } |
| 5071 | return sentToken; |
| 5072 | } |
| 5073 | |
| 5074 | it('rejects concurrent logins using the same SMS MFA OTP', async () => { |
| 5075 | const user = await setupSmsMfaUser(); |
no test coverage detected