supabase / auth-js

An isomorphic Javascript library for Supabase Auth.
MIT License
318 stars 152 forks source link

New, unsigned in user can not be deleted from supabase console. #880

Closed weisisheng closed 2 months ago

weisisheng commented 2 months ago

Bug report

Describe the bug

A clear and concise description of what the bug is.

1/ creating new users using admin api from aws lambda, node 20.x. Ultimately I want to create a user and send magic link thru backend processing only (aws step functions).

2/ While dev coding, I created users with "email requiring verification". Trying to delete them thru the console raises the error, "Failed to delete user: Database error deleting user".

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Use node.js "supabase.auth.admin.createUser" to create user
  2. Go to 'auth' section on console.
  3. Click 'delete user' from right side three dots menu
  4. Error surfaces

Expected behavior

Delete users which have not verified emails (in my case fake users sign-ups used for dev/testing).

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

Additional context

Add any other context about the problem here.

weisisheng commented 2 months ago

Found out since I was using the vercel supabase stripe starter, the user table setup was blocking the ability to delete users in the auth. Still a little f-ugly but fixed.