michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
411 stars 114 forks source link

Fixed refresh token not used when token expires #264

Closed StevenJDH closed 2 years ago

StevenJDH commented 2 years ago

When the access token expires after about 7 days, the refresh token, which expires in about 112 days, should be used to request a new access token. However, existing logic only evaluates to true when the refresh token expires. As such, after 7 days, an exception will be thrown stating that both tokens have expired. This commit fixes this logic to work as intended.

michielpost commented 2 years ago

thanks! I'll merge it and release it. I'm also going to merge #260 which changes the oath endpoints. I'm unable to test the oath setup, the sample app is not working anymore. Please let me know if there are any problems.