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

[issue] Delete account should work real #2275

Closed
sync-by-unito bot opened this issue Nov 3, 2022 · 33 comments
Closed

[issue] Delete account should work real #2275

sync-by-unito bot opened this issue Nov 3, 2022 · 33 comments

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Nov 3, 2022

Delete Button should work real instead of need QA use api to operate.

User story

As a capture user, I want the delete button could work real, so that I didn't wait for capture service team to do that.

┆Issue is synchronized with this Asana task by Unito
┆Created By: Kenny Hung
┆Link To Task: https://app.asana.com/0/1201016280880500/1203292734517496

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 4, 2022

➤ Sam commented:

Kenny Hung, currently when use click "Close account" Capture app sends request to https://node.numbersprotocol.io/api/1.1/wf/delete_user.

Olga do we really have delete account API implemented? So far these are User ( https://dia-backend-dev.numbersprotocol.io/api/v3/redoc/#operation/auth_users_me_partial_update ) APIs (Retrieve, Update User etc) but there is no Delete User API endpoint.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 7, 2022

➤ Olga commented:

Sam no, the API is not implemented. As far as I know, the current way is that QA call admin API of storage backend to remove accounts. Maybe because of historical unknown reason, we didn't allow user to remove himself/herself account.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 7, 2022

➤ Kenny Hung commented:

Tammy Yang for all teem sync discuss ( https://dt42-numbers.slack.com/archives/C43K663U0/p1667798185405159?thread_ts=1667797105.467659&cid=C43K663U0 ), this task should be close?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 8, 2022

➤ Sam commented:

Kenny Hung, as mentioned ( https://dt42-numbers.slack.com/archives/C43K663U0/p1667798185405159?thread_ts=1667797105.467659&cid=C43K663U0 ) by Tammy Yang, no need to close this task just move to next sprint (because we need backend implementation first).

I'm removing this task from v221108 dependency.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Jan 30, 2023

➤ Kenny Hung commented:

Comment by @tammy Yang on Create API to delete user without admin authorization ( https://app.asana.com/0/0/1203454417417076/1203850872719326/f )

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Feb 16, 2023

➤ Sam commented:

Tammy Yang, (cc: Bofu Chen)

Suggestion on environment vars naming for https://eomdb7ocy1jltk1.m.pipedream.net ( https://eomdb7ocy1jltk1.m.pipedream.net )

========== My .zshrc file ==========

export NUMBERS_STORAGE_BASE_URL=*******
export NUMBERS_STORAGE_TRUSTED_CLIENT_KEY=*******
export NUMBERS_BUBBLE_DB_URL=*******
export NUMBERS_BUBBLE_IFRAME_URL=*******
export BUBBLE_API_URL=*******
export APPS_FLYER_DEV_KEY=******* (should we rename it to CAPTUREAPP_APPS_FLYER_DEV_KEY?)
export NUMBERS_PQINA_NPM_KEY=******* (should we rename it to CAPTUREAPP_PQINA_NPM_KEY?)
export CAPTUREAPP_PIPEDREAM_URL=******* (is it okay naming?)

does prefixing with CAPTURE_APP tells you it's capture app specific?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Feb 16, 2023

➤ Sam commented:

Scott Yan, can you please share Postman request on how you delete a user.
Currently I tried to delete from capture app but got this error. It deletes the user but I'm getting parsing error. I just want to compare with your postman request if you have any.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Feb 16, 2023

➤ Scott Yan commented:

Sam
curl --location --request POST 'https://eomdb7ocy1jltk1.m.pipedream.net ( https://eomdb7ocy1jltk1.m.pipedream.net )'
--header 'Authorization: token 00b07bdb135d76958c65cd9b3114e8a34f165b7a' \ ← this is [email protected] token
--header 'Content-Type: application/json'
--data-raw '{
"email": "[email protected] ( mailto:[email protected] )"
}'

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Feb 16, 2023

➤ Sam commented:

Tammy Yang, https://docs.captureapp.xyz/about-capture/capture-account-and-wallet/create-and-manage-account#delete-account ( https://docs.captureapp.xyz/about-capture/capture-account-and-wallet/create-and-manage-account#delete-account ) returns HTML as a response? In angular app I expect to receive JSON response otherwise it's giving me error.

@sync-by-unito sync-by-unito bot closed this as completed Feb 23, 2023
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2023

➤ Kenny Hung commented:

Sam Just confirm,
for v230223 when user deletes their account, the process will be...?
Because after I press the delete account, the account seems still in the backend.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2023

➤ Sam commented:

Kenny Hung, when you delete account I call this url https://eomdb7ocy1jltk1.m.pipedream.net to delete account.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2023

➤ Kenny Hung commented:

Sam (cc Tammy Yang) Could you try it?
Because after I press the delete account, the account is still in the backend.
https://eomdb7ocy1jltk1.m.pipedream.net seems can't work.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2023

➤ Sam commented:

Kenny Hung, sure I will try. Can you please share how you check if user was deleted or not. Do you call specific API endpoint?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Mar 7, 2023

➤ Sam commented:

Kenny Hung,

To fix this issue I need to re-publish firebase app with https://eoqnui40j5hnf0l.m.pipedream.net url

@sync-by-unito sync-by-unito bot reopened this Apr 7, 2023
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Kenny Hung commented:

Sam (cc Tammy YangBofu Chen)

I try the delete account function.

But it can’t work.

I have opened the internet connection.

I have tried the endpoint it could work. Maybe app uses the wrong endpoint?

I use this one. https://eoqnui40j5hnf0l.m.pipedream.net ( https://eoqnui40j5hnf0l.m.pipedream.net/ )

On firebase release it could work.

https://app.asana.com/app/asana/-/get_asset?asset_id=1204352745933613 ( https://app.asana.com/app/asana/-/get_asset?asset_id=1204352745933613 )

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Kenny Hung commented:

From Sam reply.

Because TestFlight/Playstore are built by github ci we need to make sure Environment variable used for delete endpoint is correct.

To check that we need privileges like Tammy Yang or Bofu Chen to check Github env var.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Bofu Chen commented:

SamKenny Hung Please collaborate with Olga first. If this issue still cannot be fixed, let me know what's the root cause.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Bofu Chen

This issue happened on TestFlight/Play Store build 0.77.0 (which are build by pre-release.yml ( https://github.com/numbersprotocol/capture-lite/blob/master/.github/workflows/pre-release.yml ))

capture app uses env variable PIPEDREAM_URL to delete account. (

return this.httpClient.post<any>(`${PIPEDREAM_URL}`, body, {
)

And I checked pre-release.yml ( https://github.com/numbersprotocol/capture-lite/blob/master/.github/workflows/pre-release.yml ) does not contain PIPEDREAM_URL.

I think we can do hotfix as a separate asana card [issue] github CI add missing PIPEDREAM_URL to pre-release.yml & build-apks.yml ( https://app.asana.com/0/0/1204353680127605 )

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Kenny Hung, (cc: Bofu Chen):

I think root cause is found and I think it's better to use [issue] github CI add missing PIPEDREAM_URL to pre-release.yml & build-apks.yml ( https://app.asana.com/0/0/1204353680127605 ) asana card because issue is related to GitHub CI config files.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Kenny Hung commented:

Sam (cc Tammy YangBofu Chen)

Just confirm, so it could be fixed today? or Need to push next Monday?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Tammy Yang commented:

Sam I don't understand why this didn't happen during the previous test

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Tammy Yang commented:

Also, there was no task for me to create any file or variable (at least I didn't see them yet).

Just trying to understand what's missing so that we can not only fix it but also can avoid it from happening again (every time this happens it delays the testing significantly)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Tammy Yang, yes thats interesting to me too.

reason it worked on firebase releases is because I have all env vars when I build the app.

but I'm not sure why it wasn't catched on TestFlight/PlayStore builds because pre-release.yml ( https://github.com/numbersprotocol/capture-lite/blob/master/.github/workflows/pre-release.yml ) does not contain PIPEDREAM_URL at all.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Bofu Chen commented:

Sam I've added PIPEDREAM_DELETE_CAPTURE_ACCOUNT=https://eoqnui40j5hnf0l.m.pipedream.net ( https://eoqnui40j5hnf0l.m.pipedream.net ) on GitHub.

Please use PIPEDREAM_DELETE_CAPTURE_ACCOUNT instead of PIPEDREAM_URL as the variable name.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Bofu Chen hotfix PR ( #2700 ) is ready. Please have a look.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Kenny Hung, do you want me to re-release hotfix under 0.77.1?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Bofu Chen commented:

Sam PR 2700 has been merged into the main branch

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Kenny Hung commented:

Sam I think yes, unless this fixed doesn't need have a new version.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Kenny Hung okay I will prepare PR to re-release 0.77.1 which should be exact copy of 0.77.0 + delete function should work.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Kenny Hung commented:

Okay, please re-release ASAP, thanks.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Bofu Chen, hotfix-release-0.77.1 ( https://github.com/numbersprotocol/capture-lite/tree/hotfix-release-0.77.1 ) can you please have a look.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Sam commented:

Bofu Chen, here is the pr for Hotfix release 0.77.1 ( #2701 ) please have a look 🙏

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Bofu Chen commented:

Sam PR 2701 has been merged into the main branch

@sync-by-unito sync-by-unito bot closed this as completed Apr 10, 2023
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

No branches or pull requests

0 participants