Closed Palakkgoyal closed 1 year ago
This PR closes #880 I have added delete account feature. First I set up relative paths for settings page instead of absolute. Fixed the CSS of settings page such that we just need to add css for the new page and don't need to worry about the sidebar and giving margin seperately for every settings page. It was really typical to add delete account feature. First of all I used batch to delete in sync. First I delete user doc and user posts then, user using auth from firebase and then cleanup for all the images whether it is background, profile or posts image. The main problem was that to delete user it was necessary to have the user recently logged in. So, for that I set up auth.signInWithEmailAndPassword but, that was not working at all after so many trials. Then, I get to know that we need to reauthenticate the user but, the firebase docs didn't told how. After spending about 5 hours the problem solved. XD
omg, glad you could figure that out! and you also fixed the routes I'm guessing. I had assumed it to be a direct one click delete, but you improvised as well by providing a secure deletion. Thank you! Will review this asap.
This PR closes #880 I have added delete account feature. First I set up relative paths for settings page instead of absolute. Fixed the CSS of settings page such that we just need to add css for the new page and don't need to worry about the sidebar and giving margin seperately for every settings page. It was really typical to add delete account feature. First of all I used batch to delete in sync. First I delete user doc and user posts then, user using auth from firebase and then cleanup for all the images whether it is background, profile or posts image. The main problem was that to delete user it was necessary to have the user recently logged in. So, for that I set up auth.signInWithEmailAndPassword but, that was not working at all after so many trials. Then, I get to know that we need to reauthenticate the user but, the firebase docs didn't told how. After spending about 5 hours the problem solved. XD
you're right about firebase docs, they're not comprehensive. I took help of source code to solve the oauth case of re authentication which they had provided no info about.
This PR closes #880 I have added delete account feature. First I set up relative paths for settings page instead of absolute. Fixed the CSS of settings page such that we just need to add css for the new page and don't need to worry about the sidebar and giving margin seperately for every settings page. It was really typical to add delete account feature. First of all I used batch to delete in sync. First I delete user doc and user posts then, user using auth from firebase and then cleanup for all the images whether it is background, profile or posts image. The main problem was that to delete user it was necessary to have the user recently logged in. So, for that I set up auth.signInWithEmailAndPassword but, that was not working at all after so many trials. Then, I get to know that we need to reauthenticate the user but, the firebase docs didn't told how. After spending about 5 hours the problem solved. XD
you're right about firebase docs, they're not comprehensive. I took help of source code to solve the oauth case of re authentication which they had provided no info about.
Take help of ChatGPT, it knows more than docs XD
I've fixed the oauth user deletion functionality which was missing here and added some TODOs (some are optional for now) Also, I found, likes,comments didn't get deleted and cause app to crash when opening likes dialog box or show 404 when visiting the user profile. (maybe while fetching likes, it's not handling error like user not found)
Actually I am getting quota exceeded error. So, I am not able to check for likes and comments.
I've fixed the oauth user deletion functionality which was missing here and added some TODOs (some are optional for now) Also, I found, likes,comments didn't get deleted and cause app to crash when opening likes dialog box or show 404 when visiting the user profile. (maybe while fetching likes, it's not handling error like user not found)
Actually I am getting quota exceeded error. So, I am not able to check for likes and comments.
Yes, someone used the quota while testing stuffs ig . I used my own credentials to test.
This PR closes #880 I have added delete account feature. First I set up relative paths for settings page instead of absolute. Fixed the CSS of settings page such that we just need to add css for the new page and don't need to worry about the sidebar and giving margin seperately for every settings page. It was really typical to add delete account feature. First of all I used batch to delete in sync. First I delete user doc and user posts then, user using auth from firebase and then cleanup for all the images whether it is background, profile or posts image. The main problem was that to delete user it was necessary to have the user recently logged in. So, for that I set up auth.signInWithEmailAndPassword but, that was not working at all after so many trials. Then, I get to know that we need to reauthenticate the user but, the firebase docs didn't told how. After spending about 5 hours the problem solved. XD
you're right about firebase docs, they're not comprehensive. I took help of source code to solve the oauth case of re authentication which they had provided no info about.
Take help of ChatGPT, it knows more than docs XD
yes I do, but for this I got too lazy and read the source XD
This PR closes #880 I have added delete account feature. First I set up relative paths for settings page instead of absolute. Fixed the CSS of settings page such that we just need to add css for the new page and don't need to worry about the sidebar and giving margin seperately for every settings page. It was really typical to add delete account feature. First of all I used batch to delete in sync. First I delete user doc and user posts then, user using auth from firebase and then cleanup for all the images whether it is background, profile or posts image. The main problem was that to delete user it was necessary to have the user recently logged in. So, for that I set up auth.signInWithEmailAndPassword but, that was not working at all after so many trials. Then, I get to know that we need to reauthenticate the user but, the firebase docs didn't told how. After spending about 5 hours the problem solved. XD