Delete user's consent when deleting konnector account.
Based on the "onDeleteAction" method advised by cozy to do post delete operation on an account.
For more info, check https://docs.cozy.io/en/tutorials/data/advanced/#revisions
HOW TO TEST
-
Install konnector on your alpha instance -> yarn build + yarn deploy-test, on alpha ./update_grdf_konnector_dev.sh [instance]
-
Check that no existing consent are locked on grdf account.
-
Go on your ecolyo app, plug the grdf konnector.
-
Go on alpha and turn on the monitoring stack -> cd /monitoring/logs-monitoring ... docker-compose up -d
-
Plug the easy-cozy logs from your instance on a grafana panel (see existing one to know how to build the query)
-
Pass your instance on debug mode -> docker-compose exec cozy ./cozy instances debug --domain "hugo.cozy.self-data.alpha.grandlyon.com" true
-
Go back on your app and delete the konnector
-
Check that on https://monespace.grdf.fr/client/particulier/donnees-transmises the consent is now gone
-
Check the log on grafana for any informations
TEST WHEN ACCESS_TOKEN IS EXPIRED :
When you just connected the konnector, go on postman and fetch the account informations.
Replace the oauth.expires_at field with a data earlier than 4 hours ago. (IMPORTANT change the expires_at field only, konnector only checks this field anyway).
Enjoy