public async Task <Account> VerifyAccount(Platform platform, string platform_id) { Account account = await AccountDB.GetByPlatformId(platform_id); if (account == null) { account = await AccountDB.CreateAccount(platform, platform_id); } return(account); }
public async Task RefreshToken(string access_token) { try { Account account = await AccountDB.GetByPlatformId(PlatformId); if (account == null) { throw new Exception($"{PlatformId} is exist by access_token={access_token}"); } await AccountDB.RefreshToken(account.user_id, access_token); } catch (Exception ex) { _Logger.LogError(ex, "RefreshToken Failed"); } }