I have a two part question but I will break it up into two separate posts. Hopefully the first question will answer the second...The first ask is: I am working through the Google OAuth flow and would like if someone could confirm if my understanding of it is correct.
What I understand it to be is:
- We Authorize with this URL:
- This URL redirects us when we are done to
testHTMLPageand includes a
codeparameter with the authorization code. It looks something like this: https://nf--c.na99.visual.force.com/apex/testHTMLPage?code=7/aksdjfio900293842;kajs33222`
- We take the
authorization codefrom the page URL and use it to exchange for the authorization token and refresh token
- Once I have both of these tokens, I call the
https://accounts.google.com/o/oauth2/tokenand pass it the token, the key, the secret, and the redirect uri
- I should get back a response status code of 200 and can move on from there
Does this sound correct? I am having difficulty breaking the authorization down around step 2 and want to make sure I am understanding correctly.