OAuthSwift / OAuthSwiftAlamofire

Utility method to sign Alamofire request
MIT License
104 stars 38 forks source link

Fix refresh token #9

Closed sanchexx closed 6 years ago

sanchexx commented 6 years ago

Fix for issue #8 . I'm not sure if this fix is the best solution, but it works. Previously it was sending an empty string as the refresh token

Additionally, I'm wondering if something should be done to make it easier to know when the token was refreshed so that keychain can be updated? Right now there wouldn't be any easy way except to check on every request.

phimage commented 6 years ago

Thanks

@sanchexx Yes if you need, a delegate or a closure variable could be added to OAuthSwift2RequestAdapter And function or closure could be called in refreshTokens {...} block

The closure could be of type RefreshCompletion (if set public), if you want to receive also failing refresh

ghost commented 6 years ago

Hi @sanchexx and @phimage - has this change been published in a new cocoapods release?

phimage commented 6 years ago

No I think Use the head code in podfile

ghost commented 6 years ago

Thank you!