nxtbgthng / OAuth2Client

Client library for OAuth2 (currently built against draft 10 of the OAuth2 spec)
855 stars 217 forks source link

it does not work properly for fitbit #215

Open phiren opened 7 years ago

phiren commented 7 years ago

I have used it for fitbit integration, but it has issue of refreshing token automatically, On fitbit server, it only allows to refresh token one time, any other call will result in invalid refresh token.

Due to it internally calling refresh token method, it caused invalid refresh token issue, because in my app there are multiple call on fitbit, and if it resulted in all calls, it tries to refresh token multiple time and result in invalid refresh token issue.

phiren commented 7 years ago

@toto , is there any way to disable that automatic refreshing of token? the reason i want to disable is, my app is logging water to fitbit. For each record entry it uses NSOperation subclass to process. My app have integration of Today widget and also the Apple watch, so whenever any data comes from today widget or apple watch - multiple records, i have to insert records simultaneously and it causing multiple time token refresh which result in invalid refresh token issue.