code: def verify_password(self, user, password):
          
          if self.use_double_hash(user.password):
              verified = self.security.pwd_context.verify(
                  self.get_hmac(password), user.password)
          else:
              # Try with original password.
              verified = self.security.pwd_context.verify(password, user.password)
  
          if verified and self.security.pwd_context.needs_update(user.password):
              user.password = password
              self.user_manager.save(user)
          return verified
docs: Returns ``True`` if the password is valid for the specified user.
  
          Additionally, the hashed password in the database is updated if the
          hashing algorithm happens to have changed.
  
          :param user: The user to verify against
          :param password: The plaintext password to verify