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

Fitur untuk delete akun #3

Open
mazipan opened this issue Sep 18, 2023 · 5 comments
Open

Fitur untuk delete akun #3

mazipan opened this issue Sep 18, 2023 · 5 comments

Comments

@mazipan
Copy link
Owner

mazipan commented Sep 18, 2023

Menghapus semua data akun yang disimpan beserta semua pertanyaan yang tertaut dengan uid dari user tersebut.

Karena fiturnya berbahaya kalau tidak sengaja di klik, pastikan ada langkah untuk mengkonfirmasi ulang ke user.

@mazipan
Copy link
Owner Author

mazipan commented Oct 9, 2023

Delete (archieve) semua data di Notion.

  • Data questions
  • Data sessions
  • Data users

Delete data di Firebase

  • Data user

@mazipan mazipan added enhancement New feature or request intermediate-level labels Oct 10, 2023
@iffatandriano
Copy link

iffatandriano commented Oct 14, 2023

May I do this issues mas?

  • when we click button will be deleted all question on profile user and delete all data question by uid on data question?
  • when we click delete user will be deleted account and also delete all data on table questions, sessions, users, user (firebase) ?

@mazipan
Copy link
Owner Author

mazipan commented Oct 14, 2023

Screenshot_20231014-134114_Chrome

Brief:

  • Tombolnya sudah ada 2 di halaman setting akun
  • Perlu menambahkan konfirmasi dialog sebelum execute
    • Kalau perlu dibuat kaya GitHub yang mesti typing sesuatu dulu sebelum bisa delete
  • Delete semua pertanyaan --> Hapus semua di table question by uid dari si user
    • Di Notion istilahnya itu di archieve, seingetku sudah ada contohnya di libs/notion, ada di pas destroy session kalau gak salah
  • Delete akun saya --> multiple action:
    • Hapus semua question by uid di notion
    • Hapus semua config lain, macam Notifikasi, Custom OG by uid user
    • Hapus juga dari table user
    • Hapus akun dari Firebase -> ini yang agak challenging karena saya sendiri gak pernah ngelakuin, mesti baca-baca dulu gimana hapus user dari Firebase

Additional context:

  • Apakah harus looping dan hapus satu2? Atau bisa bulk hapus aja

Ini scope nya gede, feel free buat open isu per masing-masing part yang mau dikerjain dulu. Terus PR berdasarkan masing-masing isu tersebut.

Biar bisa deliver kecil2, gak perlu deliver gelondongan nanti kena conflict terus.

Kalau ragu, bisa nambah env baru NEXT_PUBLIC_DELETE_FEATURE_ENABLED, nanti di prod saya disable dulu

@amarangganar
Copy link
Contributor

I think it's better to move the "Area Berbahaya" section to outside the form (e.g below the form), because both actions aren't actually a part of the settings form (users don't have to click "Simpan Perubahan" to do either of the delete actions).

@mazipan
Copy link
Owner Author

mazipan commented Oct 14, 2023

Agree 💯 with you @amarangganar

kodiakhq bot pushed a commit that referenced this issue Oct 28, 2024
Part of #3

## Description

- Add middleware to handle Authorization
- Add methods to Archive a Page and Delete Questions by `uid`
- Add endpoint to DELETE user

📝 As stated [here](https://nextjs.org/docs/pages/api-reference/edge#unsupported-apis),

> Native Node.js APIs are not supported

that's why there is a new package added `next-firebase-auth-edge` as a workaround.

Co-authored-by: Irfan Maulana <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants