Jump to content
stuartcryan

LastPass Workflow for Alfred - update v1.4.7 August 19, 2016

Recommended Posts

Trying this new version with Alfred 3. 

 

Might be a dumb question, but how does one login with this? I set my email, and if I hit lplogin and enter, in the Alfred debug window I get the following error:

 

2465:2767: execution error: Please enter the LastPass master password for <my email address>.

Master Password: Error: Failed to enter correct password. (1)

 

If I type lplogin and then spacebar to type my password, it just goes to a Google search.

 

Hi Liam,

Not a dumb question at all, after you have run "lpsetemail your@email.here", you should just be able to run "lplogin <return>" then an applescript will run and pop up a login box which will ask you for your password.

 

When you press enter, after you wait for 1-2 seconds is the login box popping up? It should look like:

lploginbox.png

 

Cheers,

Stuart

Share this post


Link to post

Ya I'm waiting and nothing pops up. I get that error in the Alfred debug window as I mentioned. No other error, just that. Nothing in the console log either.

Share this post


Link to post

Howdy all, v1.4.7 is now released with the following changes.

  1. Changed mechanism for copying to clipboard. Now marks passwords as transient, Alfred will no longer store them in the clipboard history.
  2. Updated icon submitted by Tom Conroy has been merged in (thanks for this Tom!)

Cheers,

Stuart

Share this post


Link to post

Hi Stuart,

 

Thanks again for all your hard work. I've been MIA for a while as I've been holding off on the Alfred 3 update until I knew my workflows were compatible. You've put in some great updates. The only request I have, though, is if you can make it optional for passwords to be marked as transient, allowing them to be stored in the clipboard history. I think it's interfering with Keyboard Maestro, which I use for a simple Type Clipboard hotkey action (extremely useful for logging into server administrative panels that will now allow Ctrl-C/Cmd-C actions).

 

Thank you,

Michael

Share this post


Link to post

Hi Stuart,

 

 

First of all: the workflow works very well, thank you for it. What would make it even better though is the integration of some other lastpass features as were found in the now obsolete LastPass Vault Manager:  http://www.alfredforum.com/topic/5293-lp-vault-manager-a-workflow-for-lastpass/?page=3#comment-47967

 

What I most miss:

  • launch a vault URL in the default browser.
  • copy a vault item’s username.
  • generate random passwords.

 

Thanks,

 

Thomas

Edited by tnagels
Forgot to sign...

Share this post


Link to post
4 minutes ago, ae6dx said:

Is there a way to save Lastpass login info so I don't have to lig in every time after restart?

 

Hi Ae6dx,

No there is not, this has been deliberately excluded as a security measure. The workflow itself never stores or saves the password, it simply tells the LastPass CLI to invoke a script requesting the password (and hence never actually has visibility of the password itself).

 

Cheers,

Stuart

Share this post


Link to post

I wish this had the ability like the built in 1Password where you could search and press enter to open the site and log in.  Not just copy the username.

Share this post


Link to post

I would also love the ability to search and press enter to open the site and login. I understand the potential security issues but at the same time, you can make it so that this option only works for users who have x timeout.

 

Really good workflow! 

 

Thank you for your help!

Share this post


Link to post

Hello! I'm trying to use the Workflow, and I'm having challenges logging in. I've followed the installation instructions, and then I set my email address. But when I go through the steps to login, the password window only comes up about half the time, and then nothing happens after I type my password. After I type the password and submit it, I have tried to copy a password, but it tells me that I am not logged in. What should I do?

Share this post


Link to post

Update: it appears I was having an issue with MFA. I've always had issues with it with the browser LastPass, so I finally gave in and downloaded the LastPass app instead of using the google one, and I was able to log in. :) Thank you for the workflow!

Share this post


Link to post

Super excited to try this workflow out! I was able to successfully run through all of the installation steps and after runnning the lpsetemail command in Alfred I see the notification of success like below:

 

image.png.b92ec86bab5a739d2cb23b28d0f5c62f.png

 

However when I try to run lplogin after that I see this error message:

image.png.26a0c2f6602706c8516de69e28a26e10.png

 

Any tips?

Share this post


Link to post
3 minutes ago, mattpanther said:

Super excited to try this workflow out! I was able to successfully run through all of the installation steps and after runnning the lpsetemail command in Alfred I see the notification of success like below:

 

image.png.b92ec86bab5a739d2cb23b28d0f5c62f.png

 

However when I try to run lplogin after that I see this error message:

image.png.26a0c2f6602706c8516de69e28a26e10.png

 

Any tips?

 

Please disregard -- a restart of my Mac seems to have fixed it, working great in my first few trials!

Share this post


Link to post

Is this workflow still working ? I have to try the login command a dozen time before the prompt for master password appears, and even then, it doesn't login ..

 

[2019-01-23 21:00:13][ERROR: action.script] 2461:2743: execution error: Error: Unable to retrieve password from askpass (no reply) (1)
[2019-01-23 21:00:37][ERROR: action.script] 2461:2743: execution error: 2019-01-23 21:00:20.450 passwordInput.osascript[43281:20181072] moreMenu loaded...
/bin/bash: line 1: 43280 Segmentation fault: 11  /usr/local/bin/lpass login --trust "be********@gmail.com" (139)

 

Edited by Mehdi

Share this post


Link to post

Hi @Mehdi and @mikeylu,

Can you please make sure the scripts in the workflow directory are executable (in a terminal chmod a+x <scriptname> specifically both applescript.scpt and passwordInput.osascript and let me know how that goes?
Cheers,
Stuart

Share this post


Link to post
Starting debug for 'LastPass CLI'

[2019-02-03 14:35:39][ERROR: action.script] 2461:2743: execution error: Error: Unable to retrieve password from askpass (no reply) (1)
[2019-02-03 14:36:04][ERROR: input.scriptfilter] Code 1: <?xml version="1.0"?>
<items>
<item uid="error-login"><arg>'error-login', ''</arg><title>It appears you are not logged in to LastPass.</title><subtitle>Please login using the 'lplogin' command or press 'ctrl' + enter to login now.</subtitle><icon>icon.png</icon></item>
</items>
[2019-02-03 14:36:15][ERROR: action.script] 2461:2743: execution error: 2019-02-03 14:36:10.953 passwordInput.osascript[18759:3293227] moreMenu loaded...
/bin/bash: line 1: 18764 Abort trap: 6           /usr/local/bin/lpass ls --sync=now > /dev/null 2>&1 (134)
[2019-02-03 14:36:30][ERROR: input.scriptfilter] Code 1: <?xml version="1.0"?>
<items>
<item uid="error-login"><arg>'error-login', ''</arg><title>It appears you are not logged in to LastPass.</title><subtitle>Please login using the 'lplogin' command or press 'ctrl' + enter to login now.</subtitle><icon>icon.png</icon></item>
</items>
[2019-02-03 14:36:34][ERROR: action.script] 2461:2743: execution error: /bin/bash: line 1: 18793 Abort trap: 6           /usr/local/bin/lpass login --trust "be*********@gmail.com" (134)
[2019-02-03 14:36:47][ERROR: input.scriptfilter] Code 1: <?xml version="1.0"?>
<items>
<item uid="error-login"><arg>'error-login', ''</arg><title>It appears you are not logged in to LastPass.</title><subtitle>Please login using the 'lplogin' command or press 'ctrl' + enter to login now.</subtitle><icon>icon.png</icon></item>
</items>
[2019-02-03 14:36:51][ERROR: action.script] 2461:2743: execution error: Error: SSL connect error. (1)
[2019-02-03 14:37:08][ERROR: action.script] 2461:2743: execution error: /bin/bash: line 1: 18846 Abort trap: 6           /usr/local/bin/lpass login --trust "be*********@gmail.com" (134)
[2019-02-03 14:37:38][ERROR: action.script] 2461:2743: execution error: /bin/bash: line 1: 18868 Abort trap: 6           /usr/local/bin/lpass login --trust "be*********@gmail.com" (134)

@stuartcryan here is a sample of the errors i'm getting, it does end up working after 3 or 4 tries but still getting errors, and prompt sometimes not appearing, and sometimes appearing twice in a row..

I did the chmod +x manoeuvre, those script are executable.

 

 

Mehdi

Share this post


Link to post
Posted (edited)

Hello! I am running into a problem with the Homebrew part. 

 

When I try to run the "brew install lastpass-cli --with-pinentry --with-doc" I get an error message that says "invalid option: -with-pinentry". I am pretty sure this is an error on my end but I am stuck.

 

Thanks for you help!

Edited by TNThomas

Share this post


Link to post
9 hours ago, TNThomas said:

I am pretty sure this is an error on my end but I am stuck.

 

I don't think you're doing anything wrong. I suspect the instructions are out of date, as Homebrew has changed recently.

 

Looking at the Homebrew recipe for lastpass-cli, it seems that both those options are now default, so you should only need to do: brew install lastpass-cli

 

Share this post


Link to post

Hi,

This workflow looks awesome!

 

- the install went OK

- setting email also worked fine (I received popup notification)

- but when I run lplogin nothing shows and I get this error in Alfred debug pane:

 

ERROR: LastPass CLI[Run Script] 2845:2846: syntax error: Expected end of line but found “"”. (-2741)

 

Any idea what the issue might be?

I'm running Alfred 4.0.2

Share this post


Link to post
On 6/20/2019 at 11:05 PM, sven-a said:

Hi,

This workflow looks awesome!

 

- the install went OK

- setting email also worked fine (I received popup notification)

- but when I run lplogin nothing shows and I get this error in Alfred debug pane:

 

ERROR: LastPass CLI[Run Script] 2845:2846: syntax error: Expected end of line but found “"”. (-2741)

 

Any idea what the issue might be?

I'm running Alfred 4.0.2

image.png.09a7effcf936e7747f93bf57046d3fa2.png

image.png.6708b19fab9092ef0762075037c0c20d.png

This will fix it.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...