Commit 7cafaf5 Corentin Mors
authored
1 parent c8732ff commit 7cafaf5 Copy full SHA for 7cafaf5
File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ const getLocalConfigurationWithoutDB = async (
104
104
} ) ;
105
105
106
106
// Get the authentication type (mainly to identify if the user is with OTP2)
107
- const { type } = await get2FAStatusUnauthenticated ( { login } ) ;
107
+ // if non-interactive device, we consider it as email_token, so we don't need to call the API
108
+ const { type } = deviceCredentials ? { type : 'email_token' } : await get2FAStatusUnauthenticated ( { login } ) ;
108
109
109
110
let masterPassword = '' ;
110
111
const masterPasswordEnv = process . env . DASHLANE_MASTER_PASSWORD ;
@@ -114,10 +115,8 @@ const getLocalConfigurationWithoutDB = async (
114
115
// In case of SSO
115
116
if ( isSSO ) {
116
117
masterPassword = decryptSsoRemoteKey ( { ssoServerKey, ssoSpKey, remoteKeys } ) ;
117
- } else if ( masterPasswordEnv ) {
118
- masterPassword = masterPasswordEnv ;
119
118
} else {
120
- masterPassword = await askMasterPassword ( ) ;
119
+ masterPassword = masterPasswordEnv ?? ( await askMasterPassword ( ) ) ;
121
120
122
121
// In case of OTP2
123
122
if ( type === 'totp_login' && serverKey ) {
You can’t perform that action at this time.
0 commit comments