1

I am using the Oauth.io phonegap-sdk for my Ionic app. I am having a problem updating my Oauth.io request object with a new access token. I am able to get the refresh token on the client side and I am able to successfully get a new access token using my refresh token from Spotify/Youtube but my new access token expires when the original token was supposed to expire. Below is the flow I am experiencing:

  1. User logs in and an access token and refresh token are received by my app in the callback
  2. Refresh token is sent to my server to be stored
  3. Use the refresh token server-side to obtain a new accesstoken every x minutes (currently using 10min)
  4. Send the new access token to the client side
  5. Update the access_token field in the Oauth.io request object
  6. Conduct new api requests

The new access tokens will work all the way up until the time the original token expires (@60min). Not sure why this is happening. Is there something else I need to do to update the request object? Thanks a ton for any help you can offer. This is the last thing before I work to release my app!

ShawnS582
  • 21
  • 5

0 Answers0