We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ca6436 commit d0e5c09Copy full SHA for d0e5c09
lib/contentstackClient.js
@@ -45,9 +45,7 @@ export default function contentstackClient ({ http }) {
45
const { mfaSecret, ...credentials } = requestBody
46
requestBody = credentials
47
48
- if (requestBody?.tfa_token) {
49
- // tfa_token is already in credentials, no need to do anything
50
- } else if (mfaSecret) {
+ if (!requestBody.tfa_token && mfaSecret) {
51
requestBody.tfa_token = authenticator.generate(mfaSecret)
52
}
53
return http.post('/user-session', { user: requestBody }, { params: params })
0 commit comments