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

feat/delete-user #45

Merged
merged 5 commits into from
Nov 18, 2024
Merged

feat/delete-user #45

merged 5 commits into from
Nov 18, 2024

Conversation

inpt333
Copy link
Collaborator

@inpt333 inpt333 commented Nov 14, 2024

Closes #38

Copy link

cloudflare-workers-and-pages bot commented Nov 14, 2024

Deploying appforit with  Cloudflare Pages  Cloudflare Pages

Latest commit: 424c5b5
Status: ✅  Deploy successful!
Preview URL: https://c6deae2f.appforit.pages.dev
Branch Preview URL: https://feat-delete-user.appforit.pages.dev

View logs

Copy link
Member

@borgoat borgoat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this in the docs:1

You cannot delete a user if they are the owner of any objects in Supabase Storage.
You will encounter an error when you try to delete an Auth user that owns any Storage objects. If this happens, try deleting all the objects for that user, or reassign ownership to another user.

Probably we need to test this against the remote Supabase though.. locally it didn't seem to be a problem.

Footnotes

  1. https://supabase.com/docs/guides/auth/managing-user-data#deleting-users

lib/repositories/profiles.dart Outdated Show resolved Hide resolved
@inpt333 inpt333 changed the title Draft: feat/delete-user feat/delete-user Nov 15, 2024
@inpt333 inpt333 changed the title feat/delete-user Draft: feat/delete-user Nov 15, 2024
@inpt333 inpt333 changed the title Draft: feat/delete-user feat/delete-user Nov 15, 2024
@inpt333
Copy link
Collaborator Author

inpt333 commented Nov 18, 2024

@borgoat I had a moment of inspiration and solved the issue with the storage. It seems you also need to allow a select in a public bucket via API. On top of that, the CORS headers are needed also in the POST, otherwise the request will break.

424c5b5

The PR is finally ready.

@borgoat borgoat merged commit 9346f79 into main Nov 18, 2024
2 checks passed
@inpt333 inpt333 deleted the feat/delete-user branch November 21, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Must provide a way to delete user account and data
2 participants