Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot clear user phone number using supabase.auth.admin.updateUserById function #1008

Open
2 tasks done
bombillazo opened this issue Apr 9, 2024 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@bombillazo
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Using the supabase.auth.admin.updateUserById and passing phone as an empty string, I would expect the phone value to be set to blank, passing null also give an API error

To Reproduce

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

  1. Setup your supabase client with admin priviledges
  2. call the supabase.auth.admin.updateUserById:
await supabase.auth.admin.updateUserById(
    userId,
    {  phone: '' }, // or  {  phone: null }
  );

Expected behavior

Phone is successfully cleard.

System information

  • Version of supabase-js: 2.42.0

Additional context

Add any other context about the problem here.

@bombillazo bombillazo added the bug Something isn't working label Apr 9, 2024
@dioveath
Copy link

dioveath commented May 10, 2024

It doesn't work on this either.

const { data, error } = await supabase.auth.updateUser({ phone: "" });

Is there any way around this?

@bombillazo
Copy link
Author

Might need to tag the maintainers to get some info/update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants