code: def reset_password(self, token):
          
          expired, invalid, user = \
              self.security_utils_service.reset_password_token_status(token)
          if invalid:
              self.flash(
                  _('flask_unchained.bundles.security:flash.invalid_reset_password_token'),
                  category='error')
              return self.redirect('SECURITY_INVALID_RESET_TOKEN_REDIRECT')
          elif expired:
              self.security_service.send_reset_password_instructions(user)
              self.flash(_('flask_unchained.bundles.security:flash.password_reset_expired',
                           email=user.email,
                           within=app.config.SECURITY_RESET_PASSWORD_WITHIN),
                         category='error')
              return self.redirect('SECURITY_EXPIRED_RESET_TOKEN_REDIRECT')
  
          spa_redirect = app.config.SECURITY_API_RESET_PASSWORD_HTTP_GET_REDIRECT
          if request.method == 'GET' and spa_redirect:
              return self.redirect(spa_redirect, token=token, _external=True)
  
          form = self._get_form('SECURITY_RESET_PASSWORD_FORM')
          if form.validate_on_submit():
              self.security_service.reset_password(user, form.password.data)
              self.security_service.login_user(user)
              self.after_this_request(self._commit)
              self.flash(_('flask_unchained.bundles.security:flash.password_reset'),
                         category='success')
              if request.is_json:
                  return self.jsonify({'token': user.get_auth_token(),
                                       'user': user})
              return self.redirect('SECURITY_POST_RESET_REDIRECT_ENDPOINT',
                                   'SECURITY_POST_LOGIN_REDIRECT_ENDPOINT')
  
          elif form.errors and request.is_json:
              return self.errors(form.errors)
  
          return self.render('reset_password',
                             reset_password_form=form,
                             reset_password_token=token,
                             **self.security.run_ctx_processor('reset_password'))
docs: View function verify a users reset password token from the email we sent to them.
          It also handles the form for them to set a new password.
          Supports html and json requests.