Hey !!! I am using supertokens python SDK as a backend with a self-hosted core. Whenever we delete the user from the user management dashboard (provided by supertokens) , the user gets deleted from the database tables that are provided by supertokens (in my case, I am using mysql database), but I want to delete the user from my application's external database at the same time whenever we click on the delete user from the dashboard. Is there a way to do it?
r
rp_st
02/02/2023, 9:46 AM
hey @himanshukukreja_
rp_st
02/02/2023, 9:47 AM
you can do this by adding a custom middleware of your own before our middleware is called.
In your middleware, you can detect if the path and method matches the delete user api (that the dashboard calls)
rp_st
02/02/2023, 9:47 AM
and then delete info from your application before calling our middleware.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).