You have to set the expiration time in the 
TokenEndPoint method instead of GrantResourceOwnerCredentials method:public override Task TokenEndpoint(OAuthTokenEndpointContext context)
{
    ...
    if (condition)
    {
        context.Properties.ExpiresUtc = DateTime.UtcNow.AddDays(14);
    }
    ...
}
Comments
Post a Comment