imgbrd-grabber
imgbrd-grabber copied to clipboard
OAuth2 authentication fetches expiration from the refresh token on non-standard implementations
When a source's OAuth2 token endpoint does not use expires
or expires_in
in its response, Grabber will try to get the expiration time from the refresh token's exp
JWT claim, instead of the access token's.
Both expirations should be treated separately, but we should also consider that in most cases, refresh tokens aren't JWT and their expiration is not often indicated in responses, so we should gracefully handle the case where only the access token's expiration is known.