Search the Community
Showing results for tags 'oauth'.
Found 3 results
I know I've seen a few workflows pull it off but I'm just curious if anyone has any specific input on having Alfred handle OAuth? I would prefer to go that route over directing people to request API keys. I'm just not quite able to conceptualize how to have Alfred grab the auth token after approval. I tried looking through some workflows that incorporate it but I wasn't able to fully see how it was being pulled off.
For any file in your Dropbox folder, this workflow shows the dropbox short link URL (e.g. http://db.tt/1LkWGVJF) and copies the link to the clipboard (Cmd+Shift+D): 1. Select a file in Finder (must be a file within your Dropbox folder, e.g. ~/Dropbox/Photos/MyPhoto1.jpg) 2. Press Command+Shift+D 3. Authorize the workflow to use the Dropbox API (only if this is the first time) 4. The shortened link pops up and is copied to the clipboard. It uses OAuth in the background to connect to Dropbox so you can authorize the Alfred 2 Workflow without storing passwords insecurely. For those who are interested, it starts a Ruby-based local web server using Sinatra which is then opened in the default browser. You can authorize the Dropbox app in your browser, and then the local server shuts itself down. Once authenticated, you don't need to do this step again. Once connected via OAuth, this workflow has the potential to do a lot of things with Dropbox, but currently only queries the dropbox service for shortened URLs. This method (using OAuth/dropbox) has the advantage that any file in your Dropbox folder can be shared, not just those in the "public" directory (a deprecated method of accessing dropbox files). The downloadable workflow itself is here (on dropbox, naturally): http://db.tt/1LkWGVJF http://db.tt/A3eZqMAr (new version, fixes direct linking to folders) And the github repository is here: https://github.com/canadaduane/alfred2-dropbox Duane
UPDATE 25/05/13 - rewrote the whole damn thing in python, added aleoop for quick updates Hey guys, I've finished creating a pocket workflow, I know there are several already in the forums, but this one doesn't require your username/password at any point. (Not that other workflow creators are malicious!) You can download it here (https://github.com/altryne/pocket_alfred/raw/master/Pocket%20workflow.alfredworkflow) and all the code on github (the code is a bit of a mess, I was learning ruby as I was writing) Usage : First login with "pocket_login", this will redirect you to the pocket site to authorize Afterwards use "pocket" to share a URLs Supports : Chrome - if running Safari - if running Clipboard - if contains URL I've banged my head for a long time trying to achieve the sleak oAuth flow, and finally done it, if anyone's interested I can write a blogpost about it. Lemme know what you think, and what improvements/suggestions you may have. credits to https://github.com/vitorgalvao/alfred-workflows/blob/master/Pinadd/pinadd for the chrome and safari applescripts