Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Install is still too hard #3

Open
jnewbigin opened this issue Jan 14, 2021 · 10 comments
Open

Install is still too hard #3

jnewbigin opened this issue Jan 14, 2021 · 10 comments

Comments

@jnewbigin
Copy link
Owner

jnewbigin commented Jan 14, 2021

These are the current steps - yet to be validated

brew install node

cd
git clone https://github.com/jnewbigin/lpass-sso.git
cd lpass-sso

# Option 1: build with docker
auto/build
cd lpass-sso

# Options 2: build native
cd lpass-sso && yarn install && yarn build && yarn run electron-builder build -m zip

cd dist/mac/lpass-sso.app/Contents/
export LPASS_PINENTRY="$PWD/pinentry"

cd
git clone https://github.com/jnewbigin/lastpass-cli.git
cd lastpass-cli
git checkout sso
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local
make
./lpass login --sso [email protected]

If successful, a GUI will open and prompt you to start the Okta login flow.

Once these steps are confirmed, the next step is to make a repeatable way to run lpass.

I use a wrapper script /usr/local/bin/lpass which sets the LPASS_PINENTRY environment and then execs the real lpass client.

@jnewbigin
Copy link
Owner Author

@nottwo try these steps to get started

@araff-r7
Copy link
Collaborator

Hi @jnewbigin , I just got a chance to get this working (mostly.)
I'll make a PR shortly with some minor changes to the instructions I had to make to get this running.

One problem I'm having is that once I use ./lpass login --sso <email> the window pops up, redirects me to Okta, and lets me log in. Okta allowed me to sign in and accept the MFA prompt, but then the LaughPass Done... screen doesnt close out and the terminal command hangs without logging me in. I tested with ./lpass status and confirmed it does not finish the login process. Any ideas on this? Thanks for your continued help with this!!

@araff-r7
Copy link
Collaborator

Just some more info on this. I did some extra troubleshooting steps and found that it in my instance, it seems to be failing with a 400 Bad Request error on the fetch to https://accounts.lastpass.com/federatedlogin/api/v1/getkey.
Looking at the Network tab in Chrome, I see several 400 requests and then one 200 request for getkey. 5 of the responses come back without the k2, or a value for company_id and id_token, but one of them, seemingly the first call to getkey returns JSON with the k2 populated. Not sure if this is tied to our issue, but let me know if youd like screenshots to help debug. Thanks for your help on this!

@araff-r7
Copy link
Collaborator

araff-r7 commented Feb 5, 2021

Hi @jnewbigin , let me know what info I can collect to help you troubleshoot this. Still getting a hang on the last step (Electron app saying "Done..." then not closing) on both Mac and Ubuntu. Happy to help test and document any future changes as well to help get this working. Cheers!

@araff-r7
Copy link
Collaborator

Hi. Any update on this? This is causing issues on our end and we need a workaround. Thank you!

@araff-r7
Copy link
Collaborator

Hi @jnewbigin , I just got a chance to get this working (mostly.)
I'll make a PR shortly with some minor changes to the instructions I had to make to get this running.

One problem I'm having is that once I use ./lpass login --sso <email> the window pops up, redirects me to Okta, and lets me log in. Okta allowed me to sign in and accept the MFA prompt, but then the LaughPass Done... screen doesnt close out and the terminal command hangs without logging me in. I tested with ./lpass status and confirmed it does not finish the login process. Any ideas on this? Thanks for your continued help with this!!

This is still the issue. Just did a clean install and tested again on a new machine as well as my Mac. Now says "Finishing..." and hangs forever. Can we please have an update on this?

@araff-r7
Copy link
Collaborator

Would you like me to open a new Issue so we can test and track progress?

@jnewbigin
Copy link
Owner Author

jnewbigin commented Apr 14, 2021

Hi,
It has taken a while but I think I have things simplified a bit.
My docs are still in progress - but I have pre-built binaries which should be working for mac users

The export needs to be done in every terminal. I will prepare a step for setting that in .zshrc or .bashrc

I also plan to include lpass in the lpass-sso download so it should become a single download & install step.

https://github.com/jnewbigin/lastpass-cli/releases/download/v1.3.3/lpass-mac
https://github.com/jnewbigin/lpass-sso/releases/download/v1.0.6/lpass-sso-1.0.6-mac.zip

@farfromunique
Copy link
Collaborator

What do Ubuntu users need to do? I was able to install the .deb package with apt, and lpass-sso brings up the window, login flow works, etc., but the window doesn't close.

Also, lpass login --sso <email> gives me:

login: unrecognized option '--sso'
Usage: lpass login [--trust] [--plaintext-key [--force, -f]] [--color=auto|never|always] USERNAME

@farfromunique
Copy link
Collaborator

Update: I re-installed everything and then downloaded the 4 changed files for your patch to lpass. re-install it, and now I have the --sso option. However, I can't seem to get past the "Finishing..." step in lpass-sso.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants