First step is to obtain a code to exchange for an access token; so, we open an external website at their authorize url like this:

You should create a page in your app called something like ‘oauth_redirect’ like this:

On page load of your oauth_redirect page should be an action to obtain the returned code, then the workflow to exchange the code for an access token and store it to your user’s data which might look like this.
Call to get access token
exchange ‘code’ for access token
now store the accesstoken and other data from the response to user data


