/// <summary> /// Verify that a token is valid for changing the user's phone number /// </summary> /// <typeparam name="TUser"></typeparam> /// <typeparam name="TKey"></typeparam> /// <param name="manager"></param> /// <param name="userId"></param> /// <param name="token"></param> /// <param name="phoneNumber"></param> /// <returns></returns> public static bool VerifyChangePhoneNumberToken <TUser, TKey>(this UserManager <TUser, TKey> manager, TKey userId, string token, string phoneNumber) where TKey : IEquatable <TKey> where TUser : class, IUser <TKey> { if (manager == null) { throw new ArgumentNullException("manager"); } return(AsyncHelper.RunSync(() => manager.VerifyChangePhoneNumberTokenAsync(userId, token, phoneNumber))); }