I am currently trying to get explicit permission from the user via OAUTH2.0.
The user is redirected to the UP authentication page where he enters his username and password if he hasn't logged in yet. Then I ask for permission on certain data (for example personal data). When the users gives me permission, I redirect him to the main page (currently localhost:9000
)... the url then looks something like this:
localhost:9000/..../code=xxxxxxxxxxxxxxxx
My next step has to be exchanging the authorization code with an access token by making a POST server to server call passing the auth code and my client id/secret.. But I do not know how to do that... do you have any ideas?
Authentication steps can be found here: https://jawbone.com/up/developer/authentication I am at STEP 4 right now.
I am working with oauth-ng (http://andreareginato.github.io/oauth-ng/) and AngularJS.