SSO issues with desktop app and CLI

My company is testing out turning on the option to require SSO with GSuite logins and I’ve been testing things to make sure we can still do everything we were doing before. I have had issues with getting the desktop app logged in, and I also can’t login with the CLI.

Desktop App:

When clicking the “Enterprise Single Sign-On” button it launches a browser tab that asks for the organization id, then asks to launch the Bitwarden app, and then the tab goes blank. On the Bitwarden app it goes to an endless loading spinner that never indicates success or failure.

CLI:

Using both the --sso and --apikey options won’t log me in. When using the --sso option it launches a browser tab asking for organization id and after that shows this error:

Something went wrong logging into the Bitwarden CLI
You may now close this tab and return to the terminal.

In the terminal it then says “Something went wrong. Try again.”

For the --apikey option I set up the BW_CLIENTID and BW_CLIENTSECRET environment variables with the values provided by the Settings page in my browser webpage vault. When running the “bw login --apikey” command I enter my 2FA code and then it gives me an error saying “[object Object]”

I’d most like to be able to use the --apikey option with the CLI. Is there something I need to change, or are these just bugs that need to be fixed?

Desktop App Version: 1.23.0
CLI Version: 1.13.2
OS: MacOS Catalina 10.15.7
Browser: Chrome 86.0.4240.198

Looking into this now, we have been able to re-create the issue so just need to find root cause and work through a fix.

1 Like

We’ve found root cause for Desktop, fix in flight now, https://github.com/bitwarden/jslib/pull/210, looking at CLI now.

Same root cause, different code-path and fix in flight for CLI now, https://github.com/bitwarden/jslib/pull/211