I try to update user authenticate details in supabase using flask.
supabase_client.auth.update_user({"id": email,"password": new_password })
this is the am using to update the password in user authentication. First I request the password from user and then update that in Users table also in authentication.
@app.route('/reset', methods=['GET','POST'])
def reset():
if request.method == 'POST':
try:
email=request.form['email']
new_password = request.form['new_password']
#update new password in the supabase in table name Users
user=supabase_client.auth.get_user()
supabase_client.auth.update_user({"id": email,"password": new_password })
supabase_client.from_('Users').update({'password': new_password}).eq('email', email).execute()
flash('password is updated')
return render_template('login.html')
This is the route I used to reset the password. But am getting API error
supabase_client.auth.update_user({"id": email,"password": new_password })
I just want to know if I'm using the correct method or not, also if someone know how to update user authentication details in supabase using flask.