We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66465b1 commit c1d3c2cCopy full SHA for c1d3c2c
hub/apps/develop/security/oauth2.md
@@ -200,9 +200,13 @@ if (TokenResponse tokenResponse = tokenRequestResult.Response())
200
{
201
// ExpiresIn is zero when not present
202
DateTime expires = winrt::clock::now();
203
- if (String expiresIn = tokenResponse.ExpiresIn(); expiresIn != 0)
+ if (String expiresInStr = tokenResponse.ExpiresIn(); !expiresInStr.empty())
204
205
- expires += std::chrono::seconds(static_cast<int64_t>(expiresIn));
+ int expiresIn = std::stoi(expiresInStr);
206
+ if (expiresIn != 0)
207
+ {
208
+ expires += std::chrono::seconds(static_cast<int64_t>(expiresIn));
209
+ }
210
}
211
else
212
0 commit comments