parse-dashboard icon indicating copy to clipboard operation
parse-dashboard copied to clipboard

User field `authData` cannot be deleted

Open mtrezza opened this issue 4 years ago • 3 comments

New Issue Checklist

Issue Description

Trying to delete the authData field in the _User collection fails with error:

This authentication method is unsupported.

Steps to reproduce

  1. Find user with a populated authData field
  2. Select cell
  3. Hit delete button

Actual Outcome

Error message appears, field value is not deleted.

Expected Outcome

Field value should be deleted.

Note

It also does not work to only select a specific auth provider in the authData field and delete on that provider entry, e.g. "facebook: { ... }" or "apple: { ... }". The result appears correctly in the cell with the authData field updated to {}, even showing a success pop-up. But after refreshing the data browser, the auth data is still there.

Environment

Dashboard

  • Parse Dashboard version: 3.2.1

mtrezza avatar Dec 10 '21 15:12 mtrezza

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza I'm not sure whether we can set authData back to null.

Please refer this testcase in parse-server.

sadakchap avatar Dec 26 '21 07:12 sadakchap

I've added that test case in https://github.com/parse-community/parse-server/pull/6154 because there is no actual authData field in the DB. What we see in the dashboard as authData is synthesized of all individual _auth_data_<provider> fields. Creating an actual authData field in the DB of value null would crash the server, hence the PR.

However, if one deletes the whole authData field in dashboard the appropriate action would be to delete all individual _auth_data_<provider> fields in the DB. It seems that this logic is currently missing, possibly only in Parse Server and this may not even be a Parse Dashboard issue.

mtrezza avatar Dec 26 '21 14:12 mtrezza