public static async Task <AppTokenResult> RenewAccessTokenAsync(OAuthTicket ticket, FileDataStore datastore, string userid) { string oldRefreshToken = ticket.RefreshToken; AppTokenResult appToken = null; if (!string.IsNullOrEmpty(oldRefreshToken)) { appToken = await MicrosoftAccountOAuth.RedeemRefreshTokenAsync(msa_client_id, msa_client_secret, oldRefreshToken); await SaveToken(datastore, userid, appToken, CancellationToken.None); } return(appToken); }
public static async Task<AppTokenResult> RenewAccessTokenAsync(OAuthTicket ticket, FileDataStore datastore, string userid) { string oldRefreshToken = ticket.RefreshToken; AppTokenResult appToken = null; if (!string.IsNullOrEmpty(oldRefreshToken)) { appToken = await MicrosoftAccountOAuth.RedeemRefreshTokenAsync(msa_client_id, msa_client_secret, oldRefreshToken); await SaveToken(datastore, userid, appToken, CancellationToken.None); } return appToken; }