Jump to content
stuartcryan

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

Recommended Posts

Howdy everyone,

I can happily say today I release v1.2 of the workflow. This should be significantly more stable and resolve some login issues people have been having. Please let me know if you have any issues in case there are still some slightly different configurations out there the workflow is not yet dealing with.

Cheers,
Stuart

 

Changes in this release:

  1. Bug - Removed deprecated framework code
  2. Bug - Merged pull request #4 from jsquyres "we-love-macports-too" to support macports installs of the lastpass-CLI
  3. Bug - Further improved on jsquyres code to support some additional install locations.
  4. Bug - Fixed bash script reliability, after two login attempts the script was often failing.
  5. Improvement - Improved sync behaviour to better support extremely large vaults.
  6. Improvement - Added new 'lpsync' command to force a sync on demand.
  7. Improvement - Changed behaviour to store login email in your Apple Keychain (set with 'lpsetemail yourname@example.com').
  8. Improvement - Added the ability to set the logout timeout and store in the keychain (set with 'lpsettimeout NUMSEC' where NUMSEC is an integer such as 28800, if you use 0 that will keep you logged in until your computer restarts).
  9. Improvement - Added hotkeys to the main functions.

Share this post


Link to post

Hey,

 

When I'm trying to login I get an error login illegal option in terminal. Any idea what the problem could be?

I've attached a screenshot.

https://www.dropbox.com/s/lhfnmbm350w5lij/Screenshot%202015-08-26%2013.51.12.png?dl=0

 

Set email worked fine, when I tried to login I got this problem.

Hmm it seems as though it could not find the lpass binary. Have you installed lastpass-cli?

 

Also what happens when you run in terminal:

which lpass

 

Cheers,
Stuart

Share this post


Link to post

Yes, working really smooth, love it! Great job!

No worries at all :) and I will have a look at fixing that as it *should* be telling you that the binary is not installed. Will get a fix in for that for the next version.

Cheers,
Stuart

Share this post


Link to post

Appreciate the user experience focus! I have a question, using 1password with alfred, it lets you launch a website (already logged in). Something like "1p evernote login chrome". I've just heard of this, didn't see what the commands would be. Any idea if this would work with lastpass too? Or maybe you can consider it for the future. 

Share this post


Link to post

Appreciate the user experience focus! I have a question, using 1password with alfred, it lets you launch a website (already logged in). Something like "1p evernote login chrome". I've just heard of this, didn't see what the commands would be. Any idea if this would work with lastpass too? Or maybe you can consider it for the future. 

Unfortunately (as I don't believe there is any way to integrate with the binaries within the browser) I don't think that would be achievable. However, I am going to work on a feature request discussed recently that will open the URL of the item in your default browser then copy the password to the clipboard :)

Cheers,
Stuart

Share this post


Link to post

Installed and works, thanks for the effort!

I've noticed an issue with searches containing more than one word?

 

edit: forgive me for linking the images like this, they look huge when linked thru the forum editor...

successful-search (password was copied) - http://i.imgur.com/h3v9ruC.png

not-found (expected) - http://i.imgur.com/2YvdOUg.png

lastpass-cli-not-installed (weird) http://i.imgur.com/LIFZKI3.png

As I've done the first two searches, the result of the third search is impossible.

Apologies if this has been reported before or is noted somewhere...

 

Also, a trivial typo I must report for the sake of perfection (by default)... - http://i.imgur.com/73L4nsj.png 


 

Edited by theplaypig

Share this post


Link to post

i am not a technical person and don't know anything about capture:tiny, homebrew etc. But I have installed everything and i am on the stage of logging in pinentry :)  

 /usr/local/bin/lpass login [--trust] [--plaintext-key [--force, -f]] USERNAME

 

i am hesitant to ask, and you can laugh or beat me to death but I have gathered strength to ask this :

 

is there a risk of my master password getting compromised this way? There is a lot going on in CLI and i don't know what all code my MasterPassword would go through and which host/domain these scripts might connect from background. I appreciate this fantastic workflow and don't doubt you at all. its just that i want to know the background work these scripts would do. 

Apologies if i offended you or anybody.

 

Regards,

Jay

Share this post


Link to post

H

 

i am not a technical person and don't know anything about capture:tiny, homebrew etc. But I have installed everything and i am on the stage of logging in pinentry :)

 /usr/local/bin/lpass login [--trust] [--plaintext-key [--force, -f]] USERNAME

 

i am hesitant to ask, and you can laugh or beat me to death but I have gathered strength to ask this :

 

is there a risk of my master password getting compromised this way? There is a lot going on in CLI and i don't know what all code my MasterPassword would go through and which host/domain these scripts might connect from background. I appreciate this fantastic workflow and don't doubt you at all. its just that i want to know the background work these scripts would do. 

Apologies if i offended you or anybody.

 

Regards,

Jay

Hi Jay,

The workflow itself does not do any storage of passwords in any way shape or form.

 

Really it comes down to the CLI that has been written by the lastpass team and how much you trust them/it. Essentially all this workflow does is leverage the content within the CLI that Lastpass provides.

 

Therefore I would say you would need to make an assessment as to how much you trust that LastPass has put together a safe CLI. Having said that if you trust them enough to use their other browser plugins, I foresee no issue why their CLI should be any different.

 

And no worries at all, no offence taken, it is good to be diligent in these matters.

Cheers,
Stuart

Share this post


Link to post

Installed and works, thanks for the effort!

I've noticed an issue with searches containing more than one word?

 

edit: forgive me for linking the images like this, they look huge when linked thru the forum editor...

successful-search (password was copied) - http://i.imgur.com/h3v9ruC.png

not-found (expected) - http://i.imgur.com/2YvdOUg.png

lastpass-cli-not-installed (weird) http://i.imgur.com/LIFZKI3.png

As I've done the first two searches, the result of the third search is impossible.

Apologies if this has been reported before or is noted somewhere...

 

Also, a trivial typo I must report for the sake of perfection (by default)... - http://i.imgur.com/73L4nsj.png 

 

Howdy my good man, so sorry I missed this.

I have logged two bugs for you:

1. Weird search issue --> https://github.com/stuartcryan/lastpass-alfred-workflow/issues/12

2. Shameful SHAMEFUL typo LOL --> https://github.com/stuartcryan/lastpass-alfred-workflow/issues/13

 

Thank you for reporting them, I have a week off as of this evening so hopefully will be able to get to them.

Cheers,
Stuart

Share this post


Link to post

Hi, I'm having trouble trying to install this on a new computer.  (I've previously installed it successfully on a different computer, with a small subset of the errors below, all of which cleared quickly after restart of alfred or the mac itself, or just random good luck).  

 

I've installed lastpass-cli, which works in terminal.

 

So far workflow behavior has been:

 

1. No reaction to any of the lastpass commands (lpsetemail, lplogin).

 

(reinstall/restart stuff at random, hope for the best)

 

2. lpsetemail now works insofar as the notification center now says "Login Email Address Set To: myemailaddress".  However, lplogin still does nothing, and search says I'm not logged in (I tried this before and after logging in to LP in the terminal with the same result).

 

Please help; I really like using it on my other computer :)

Share this post


Link to post

I solved my problem when I realized Alfred couldn't open any terminal windows whatsoever.

 

I had "Custom" set as the chosen terminal, this was copied over from Alfred's preferences on the other computer.  

 

However in the new computer I only have the OSX Terminal installed.

 

So after changing the preference to use "Terminal", the workflow runs great =D. 

 

 

 

Also, the lack of notifications in 1. in the above post was explained when it happened today; I have a Do Not Disturb mode scheduled for certain times of the day, and all my Alfred notifications get caught by this.

Share this post


Link to post

I can't seem to get this to work for me. While it will load many passwords, it doesn't load them all. I don't know if the directory hierarchy is the cause, permissions, or just terrible organization (it's well known, our team is working on it).

 

Currently we have the hierarchy set as such:

 

Client Named Folder

 

_Administrative account

 

SOME-SERVER-01

 

_Services, Portals, Website Logins

 

www.somewebsitelogin.com

 

Some.random.password.that.shouldnt.be.here

 

Note, our structure is totally mucked up and that's only representative of what we would like to be ideal and not the whole structure overall, which again, we're working on. Though I don't how much that would affect the visibility of passwords. The only other thing I can think of is permissions, but whenever I'm using the CLI interface, I can see all the secure notes, sites, etc. without issue.

 

I'd love to use this more, but it only seems like I can pull about 50% of the passwords out before nothing else syncs.

 

Thank you for any suggestions.

 

Michael

Share this post


Link to post

I can't seem to get this to work for me. While it will load many passwords, it doesn't load them all. I don't know if the directory hierarchy is the cause, permissions, or just terrible organization (it's well known, our team is working on it).

 

Currently we have the hierarchy set as such:

 

Client Named Folder

 

_Administrative account

 

SOME-SERVER-01

 

_Services, Portals, Website Logins

 

www.somewebsitelogin.com

 

Some.random.password.that.shouldnt.be.here

 

Note, our structure is totally mucked up and that's only representative of what we would like to be ideal and not the whole structure overall, which again, we're working on. Though I don't how much that would affect the visibility of passwords. The only other thing I can think of is permissions, but whenever I'm using the CLI interface, I can see all the secure notes, sites, etc. without issue.

 

I'd love to use this more, but it only seems like I can pull about 50% of the passwords out before nothing else syncs.

 

Thank you for any suggestions.

 

Michael

Hi Michael,

I am currently liaising with LastPass support to see what options I have for basically generating a large dummy vault so that I can do some performance testing.

 

I will keep you posted.

Cheers,
Stuart

Share this post


Link to post

I solved my problem when I realized Alfred couldn't open any terminal windows whatsoever.

 

I had "Custom" set as the chosen terminal, this was copied over from Alfred's preferences on the other computer.  

 

However in the new computer I only have the OSX Terminal installed.

 

So after changing the preference to use "Terminal", the workflow runs great =D. 

 

 

 

Also, the lack of notifications in 1. in the above post was explained when it happened today; I have a Do Not Disturb mode scheduled for certain times of the day, and all my Alfred notifications get caught by this.

Howdy my good man,

sorry for the delay, it seems I missed out on these email notifications when my mailbox overflowed and stopped accepting emails #oops

 

Glad you got it solved.

Cheers,
Stuart

Share this post


Link to post

Ladies and gents,

I can happily say today marks the release of a LOT of time and effort... 1.4.2 of the workflow is OUT

Version 1.4.2 MAJOR update - Please Read

-----------------------------------------------------------

Ladies and gents, I am happy to present v 1.4.2 of the workflow. Before I continue, this has represented a SIGNIFICANT amount of work for me so if you like it and use it, please say thank you by donating towards my Diet Coke and cake fund.  :D Any amount will do, whatever you feel the value is for you/your business/your time.   :)

 

Please note you *MUST* update your LastPass CLI version to 0.7.1 or higher as this update relies on new functionality that I worked with the LastPass team on integrating into the official CLI.

 

I would also like to say thank you to Michael B. who was extremely patient and worked with me back and forth to help quash an evil bug that stopped some vault items from displaying at all.

 

If you haven't used LastPass before... you are crazy and you should it is the single greatest password manager package out there  :D so check it out at http://stu.link/LaStPaSs (Disclaimer, if you sign up through that link I get a free month otherwise you can go direct to http://www.lastpass.com).

-----------------------------------------------------------

 

Version 1.4.2

  1. NOTE: This version *requires* the LastPass CLI v 0.7.1 or higher due to this new feature --> Login process completely changed over to use AppleScript (cleaner and nicer). This was thanks to work between myself and Bob from LastPass who maintains the official LastPass CLI to add a feature allowing an external login prompt to be used.
  2. Login password prompt now uses an AppleScript password prompt.
  3. Fix to allow you to search for words in any order.
  4. Vault item's which now require re-authentication will pop up the AppleScript login prompt.
  5. Has now been tested with a Vault with over 30,000 items for performance tweaks. (I have since been told by LastPass support their soft limit is significantly lower than this at ~2500 items explains why I was having some issues in testing).
  6. More resilient escaping of text in the XML to ensure that special characters should not cause any issues.
  7. Fixed missing quotes in some areas that could cause issues with spaces.
  8. Squashed a little regex bug and wiped up the goo.
  9. Fixed issues with spaces in certain paths we referenced
  10. Fixed how the initial login process is run after a reboot. This required the changes made to how we manage the login process and it has subsequently been cleaned up significantly.
  11. Other minor general tweaks.

Any issues please log an issue over at GitHub.

Edited by stuartcryan

Share this post


Link to post

Ladies and gents,

I can happily say today marks the release of a LOT of time and effort... 1.4.2 of the workflow is OUT

Version 1.4.2 MAJOR update - Please Read

-----------------------------------------------------------

Ladies and gents, I am happy to present v 1.4.2 of the workflow. Before I continue, this has represented a SIGNIFICANT amount of work for me so if you like it and use it, please say thank you by donating towards my Diet Coke and cake fund.  :D Any amount will do, whatever you feel the value is for you/your business/your time.   :)

 

Please note you *MUST* update your LastPass CLI version to 0.7.1 or higher as this update relies on new functionality that I worked with the LastPass team on integrating into the official CLI.

 

I would also like to say thank you to Michael B. who was extremely patient and worked with me back and forth to help quash an evil bug that stopped some vault items from displaying at all.

 

If you haven't used LastPass before... you are crazy and you should it is the single greatest password manager package out there  :D so check it out at http://stu.link/LaStPaSs (Disclaimer, if you sign up through that link I get a free month otherwise you can go direct to http://www.lastpass.com).

-----------------------------------------------------------

 

Version 1.4.2

  1. NOTE: This version *requires* the LastPass CLI v 0.7.1 or higher due to this new feature --> Login process completely changed over to use AppleScript (cleaner and nicer). This was thanks to work between myself and Bob from LastPass who maintains the official LastPass CLI to add a feature allowing an external login prompt to be used.
  2. Login password prompt now uses an AppleScript password prompt.
  3. Fix to allow you to search for words in any order.
  4. Vault item's which now require re-authentication will pop up the AppleScript login prompt.
  5. Has now been tested with a Vault with over 30,000 items for performance tweaks. (I have since been told by LastPass support their soft limit is significantly lower than this at ~2500 items explains why I was having some issues in testing).
  6. More resilient escaping of text in the XML to ensure that special characters should not cause any issues.
  7. Fixed missing quotes in some areas that could cause issues with spaces.
  8. Squashed a little regex bug and wiped up the goo.
  9. Fixed issues with spaces in certain paths we referenced
  10. Fixed how the initial login process is run after a reboot. This required the changes made to how we manage the login process and it has subsequently been cleaned up significantly.
  11. Other minor general tweaks.

Any issues please log an issue over at GitHub.

 

OK so human error is a thing... it happens, and totally my bad. After releasing this a couple of guys have pointed out to me that the binary itself did not actually update :( :( :( so all of you that tried to download this yesterday would have got the same old boring workflow.

 

HOWEVER

 

That is now fixed and we have v1.4.3 which also adds another feature/fix which I had a stroke of genius on yesterday (after the original release). 1.4.3 also includes a feature/fix to drastically speed up the performance of the LastPass CLI's copy to clipboard function. Therefore passwords should now copy with lightening speed :)

 

Looking forward to everyone's thoughts.

Share this post


Link to post

I can't seem to get this to work for me. I'm new to Alfred so I might be missing something obvious. I've followed all the install steps, but I can't figure out what to do with "Open up the workflow within Alfred, double click the top "Terminal Command" box in the workflow and change "yourloginemail@yourdomain.com" to your LastPass username."

 

I've set my email address with the lpsetemail. When I login, I just get repeated password prompts (I've triple checked that I've entered my master password correctly). Thoughts?

Share this post


Link to post

If you have 2-Factor Authentication enabled, you will have to disable it temporarily then re-enable it after you've entered the master password.

 

If you reboot your system, you will have to log back in and repeat the process.

Share this post


Link to post

I can't seem to get this to work for me. I'm new to Alfred so I might be missing something obvious. I've followed all the install steps, but I can't figure out what to do with "Open up the workflow within Alfred, double click the top "Terminal Command" box in the workflow and change "yourloginemail@yourdomain.com" to your LastPass username."

 

I've set my email address with the lpsetemail. When I login, I just get repeated password prompts (I've triple checked that I've entered my master password correctly). Thoughts?

 

There is a known issue at the moment, a code change has been submitted but it has been a very busy month. I hope to review it in the next few days. In the mean time. In the first popup, enter your password, the second time it pops up, enter your 2FA code and it will get you in.

 

Cheers,
Stuart

Share this post


Link to post

 

There is a known issue at the moment, a code change has been submitted but it has been a very busy month. I hope to review it in the next few days. In the mean time. In the first popup, enter your password, the second time it pops up, enter your 2FA code and it will get you in.

 

Cheers,
Stuart

 

 

 

Oh sweet, didn't know that. Thanks!

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...