MCPcopy
hub / github.com/parse-community/parse-server / requestLoginOtp

Function requestLoginOtp

spec/vulnerabilities.spec.js:5056–5072  ·  view source on GitHub ↗
(username, password)

Source from the content-addressed store, hash-verified

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();

Callers 1

Calls 1

requestFunction · 0.50

Tested by

no test coverage detected