'Why both expires_in and access_token.exp in OAuth2 Access Token Response?

They are basically the same time (now+expires_in = access_token.exp).
So why it's returned twice?



Solution 1:[1]

Because then you do not have to calculate the actual expiration date yourself, if you want to know it.

If you know a calculation is going to be done by the majority of your consumers and doesn't negatively impact performance in a significant way, why not do it yourself and save thousands (or maybe even hundreds of thousands) of consumers the need to code that calculation?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Chrotenise