deleted deleted • about 7 years ago
Requests for help on a few API usage topics, especially client side OAuth initiation.
I'm getting started with the Node.JS client library. I have a few questions:
1) Is there forum where I can post my API usage questions? If so, please leave me the URL here.
2) In the client library code, I see references to "this.callback" in several places. However, I can't seem to find where that element is defined. Where can I get an explanation of what code defines/declares that method and what is the context of the "this" object at this point? (See line 15 of accounts.js).
3) I see the calls for creating a new ContextIO API object with the consumer key and secret defined in keys.json (now updated to reflect my consumer key and secret). However, I'm having some trouble wrapping my head around the "big picture" using OAuth with the API.
My intention is to have a Node.JS server acting as a middleman to my clients that reside on the user's local device. What I can't figure out are the steps I would follow to initiate the OAuth session from the client, with my server code then forwarding the request to OAuth provider (GMail in this case) in order to have the user be logged in by Gmail, resulting in the authenticated token ending up back in my hands for use with subsequent API calls when the OAuth provider accesses a URL I provide for that purpose.
Is there a document or sample that shows generally what I would do to make this happen? I'm used to OAuth session where I provide a callback URL to the provider with the code behind that URL receiving the token that is now authenticated.
Comments are closed.