Oauth 2.0 workflow with Tasker

123 views
Skip to first unread message

David Berlind

unread,
Sep 25, 2016, 3:49:49 PM9/25/16
to Tasker


Anybody out there with experience going through an Oauth 2 workflow with tasker and the RESTtask plug-in? In this case, I'm working with a Google API.  The first leg of the workflow is a simple URL retrieval (a GET using Net/HTTP GET). 

The URL is as follows:

https://accounts.google.com/o/oauth2/auth?scope=<scope string goes here>&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=<client ID goes here>

I have the scope string and client ID already. These are not the problem.

When you GET this URL, one of two things should happen (and do happen if I use an ordinary browser):

1. if you're logged-in to Google, you go straight to the permissions page that asks the user to  "Deny" or "Allow"



2. If you're not logged into Google, it asks the user to log in first, and the does #1 

I am, in-fact, getting the proper page source back in %HTTPD.  


I'm looking for clues on how to:
  • present that page (which ever one comes back first)
  • let the user complete the workflow (either 1. login, then click "allow", or "just click "Allow")
  • capture the contents of the next page that comes back which contains the Oauth Authorization Code
I tried using Alert/HTMLPopup and it does in fact pop the page up (in my case, the login dialog), but it's in a small window and it disappears within seconds.

Thanks to anyone who can help me get through this part of the workflow.

David


Mark Campos

unread,
Jul 1, 2017, 2:10:04 PM7/1/17
to Tasker
Hey David, did you ever find a solution for this one? Going through the same thing myself.
Reply all
Reply to author
Forward
0 new messages