/// <summary> /// <para> /// Refreshes a users provider details /// </para> /// </summary> /// <param name="UserId"></param> /// <returns></returns> public async Task <PublicUser> UpdateProviderDetails(int UserId) { string ProfileKey = string.Format(KEY_UserProfile, UserId); var accessToken = _redis.HashGet(ProfileKey, HASH_ProviderAccessToken); var User = JsonConvert.DeserializeObject <User>(_redis.HashGet(ProfileKey, HASH_ProfileData)); var UpdatedProfile = await GitHubApi.Get <GitHubOAuthProfile>("https://api.github.com/users/ZacMillionaire", accessToken); User.SetProviderProfile <GitHubProfile>(CreateUserFromOAuth(UpdatedProfile).ProviderProfile); // cheat and use the register user method. I know it's dumb, but until I can be bothered to change the name // to something better, this is what its called return(RegisterUser(User)); }