code: def client_reset(client):
      
      if request.form.get('reset') == 'yes':
          client.reset_client_secret()
          db.session.commit()
      return redirect(url_for('.client_view', client_id=client.client_id))
docs: Reset client's secret.