I am using TSphinxLogin with login.microsoftonline.com as an authority to get an access token from microsoft.
It works really well, except getting the expiration date to refresh the token.
I found out that the oauth2/token endpoint returns something like this:
{
"token_type": "Bearer",
"expires_in": "3599",
"ext_expires_in": "3599",
"expires_on": "1789394944",
"access_token": "<redacted>",
"refresh_token": "<redacted>",
"id_token": "<redacted>"
}
Notice that expires_in is a string instead of a number.
In TOidcClient.ProcessCodeResponse it just looks for a number and if it doesn't exist it assumes the year 9999.
Would it be possible to also parse strings which contain numbers?
Is there an easy workaround for me or would I need to wait for another release?
I know the specification states it must be a number but I thought I would have more luck getting it implemented in Sphinx than asking microsoft to fix it.