6-digit login code

This is a simple login question. I have Visual Studio Code with Particle Workbench set up. In trying to login, it is asking for a 6-digit login code (which I assume is the 2-factor authentication), but somewhere I skipped that step. Now when I login it says “User credentials are invalid”. I assume it is “invalid” because I skipped that step in setup. How do I enable the authentication at this point after I skipped it earlier to get a “valid credentials” message? (assuming that is what is causing this message)

From a noob on this platform…

1 Like

I had a similar issue with this, i ended up uninstalling the Particle CLI and that seemed to have fixed the issue.

If you log in to the WEB IDE, you should be prompted with the option for 2 factor authentication and from there you can set this up. You need to install the authenticator app, and that generates the 6 digit code.

hey there :wave:

if 2FA is not enabled on the account you are trying to sign-in with, you can skip the 6-digit login code (aka otp) by just leaving the input blank and pressing the <enter> key

if 2fa is enabled, you’ll need to provide the login code.

from within VSCode + Workbench, run the Particle: Login command and follow the prompts. if you see the Login failed error notification (bottom-right), click the “view log” button and review the error details - if you see Could not validate OTP, that means your account is using 2FA. if instead you see User credentials are invalid, that means you are using the wrong email or password.

hope it helps!


edit: i added this info to the docs

3 Likes

Not quite correct.

Two step was not enabled and I can log into the web IDE fine. When logging into the IDE VS and clicking enter when asked for a 6 digit number, the login still fails with the following error. This may be related to some other issue, such as being behind a firewall with ports blocked though.

openssl config failed: error:02001003:system library:fopen:No such process

null


And logging in with a different account with 10+ digit passcode without 2 step turned auth enabled gives:
(worst of all it gives back the password in plain text in the error :frowning: )

User credentials are invalid

openssl config failed: error:02001003:system library:fopen:No such process

Error: Command failed: C:\Users\jerry.vscode\extensions\particle.particle-vscode-core-1.4.2\src\cli\bin\windows\amd64\particle.exe login -u myemail@gmail.com -p ##(passcode)## --otp -

! User credentials are invalid

openssl config failed: error:02001003:system library:fopen:No such process

e[2Ke[1G! There was an error logging you in!

It seems we’re having trouble with logging in.

at makeError (C:\Users\jerry.vscode\extensions\particle.particle-vscode-core-1.4.2\node_modules\execa\index.js:174:9)

at module.exports.Promise.all.then.arr (C:\Users\jerry.vscode\extensions\particle.particle-vscode-core-1.4.2\node_modules\execa\index.js:278:16)


This may be related to some other issue

openssl config failed: error:02001003:system library:fopen:No such process

it seems so. try running Particle: Audit Environment and share the non-sensitive parts here.

I’m having the same issue.
Particle: Audit Environment - yields the following:


*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

{
    "username": null,
    "workspace": {
        "name": "",
        "isWorkspace": false,
        "folders": []
    },
    "cli": {
        "binpath": "/Users/firstlast/.vscode/extensions/particle.particle-vscode-core-1.4.2/src/cli/bin/darwin/amd64/particle",
        "ok": true,
        "version": "1.40.0",
        "installed": 155xxxxxxxxxx
    },
    "localCompiler": {
        "ok": true,
        "dependencies": [
            {
                "id": "deviceOS@1.0.1",
                "ok": true
            },
            {
                "id": "gcc-arm@5.3.1",
                "ok": true
            },
            {
                "id": "buildtools@1.0.3",
                "ok": true
            },
            {
                "id": "buildscripts@1.5.0",
                "ok": true
            },
            {
                "id": "openocd@0.10.0-particle.1",
                "ok": true
            }
        ]
    },
    "platform": {
        "os": "darwin",
        "type": "Darwin",
        "release": "17.7.0",
        "arch": "x64",
        "path": {
            "key": "PATH",
            "value": "/usr/bin:/bin:/usr/sbin:/sbin"
        },
        "homeDir": "/Users/firstlast",
        "particleDir": "/Users/firstlast/.particle",
        "localCompilerToolchainDir": "/Users/firstlast/.particle/toolchains"
    },
    "env": {
        "TMPDIR": "/var/folders/12/9371sdjd4l968hvrb7syy4jh0000gn/T/",
        "__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0",
        "HOME": "/Users/firstlast",
        "SHELL": "/bin/bash",
        "Apple_PubSub_Socket_Render": "/private/tmp/com.apple.launchd.ILjVvWgCwU/Render",
        "SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.A4uAL727Cl/Listeners",
        "PATH": "/usr/bin:/bin:/usr/sbin:/sbin",
        "LOGNAME": "firstlast",
        "DISPLAY": "/private/tmp/com.apple.launchd.fWeEulbPOz/org.macosforge.xquartz:0",
        "XPC_SERVICE_NAME": "com.microsoft.VSCode.100852",
        "COMMAND_MODE": "unix2003",
        "USER": "firstlast",
        "XPC_FLAGS": "0x0",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "/Users/firstlast/Library/Application Support/Code/CachedData/51b0b28134d51361cf996d2f0a1c698247aeabd8",
        "VSCODE_LOGS": "/Users/firstlast/Library/Application Support/Code/logs/20190427T124442",
        "VSCODE_IPC_HOOK": "/Users/firstlast/Library/Application Support/Code/1.33.1-main.sock",
        "VSCODE_PID": "54157",
        "AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
        "PIPE_LOGGING": "true",
        "VERBOSE_LOGGING": "true",
        "VSCODE_IPC_HOOK_EXTHOST": "/var/folders/12/9371sdjd4l968hvrb7syy4jh0000gn/T/vscode-ipc-79d9a09a-5cab-4da6-9ff8-8467518ae021.sock",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_PREVENT_FOREIGN_INSPECT": "true",
        "ELECTRON_RUN_AS_NODE": "1",
        "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true"
    },
    "versions": {
        "http_parser": "2.8.0",
        "node": "10.2.0",
        "v8": "6.6.346.32",
        "uv": "1.20.3",
        "zlib": "1.2.11",
        "ares": "1.14.0",
        "modules": "64",
        "nghttp2": "1.29.0",
        "napi": "3",
        "openssl": "1.1.0h"
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "/Users/firstlast/Applications/Visual Studio Code.app/Contents/Resources/app",
        "machineId": "1234c706ac29771505d967846cef87aa3728384d33301c65a16f2ed21abed164",
        "sessionId": "1234a19c-8e71-4a84-9a0f-d48eff4d45181556383493890",
        "version": "1.33.1"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.33.3"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.33.0"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.26"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.2.3"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.22.1"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.4.2"
        },
        {
            "id": "particle.particle-vscode-pack",
            "version": "1.4.2"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.4.2"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.4.2"
        }
    ]
}

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

I’m having the same issue.

what issue specifically? this output implies your CLI is working fine:

    "cli": {
        "binpath": "/Users/firstlast/.vscode/extensions/particle.particle-vscode-core-1.4.2/src/cli/bin/darwin/amd64/particle",
        "ok": true,
        "version": "1.40.0",
        "installed": 155xxxxxxxxxx
    },

if it’s easier, you can try logging in via the CLI directly: run the Particle: Launch CLI command and then in the terminal instance that launches run particle login and follow the steps.

if you’ve forgotten your password, you can reset it here: https://login.particle.io/forgot

1 Like

Okay, my bad.
Particle login and device login were 2 seperate passwords.
Works now.
Thanks

1 Like

working w/ @power64 via DM, we’ve confirmed that the error:

openssl config failed: error:02001003:system library:fopen:No such process

was due to a bad environment variable: OPENSSL_CONF - specifically:

"OPENSSL_CONF": "C:\\OpenSSL-Win32\\bin\\openssl.cfg"

removing that entirely or setting it to point at a valid location resolved the problem