Hi everyone, I am using Supertokens dashboard for ...
# support-questions-legacy
s
Hi everyone, I am using Supertokens dashboard for viewing users and sometimes for session management for my application. I want to extend the APIs; that the dashboard uses to delete the user, edit name, and revoke session info; for the cases like performing additional checks and DB actions when that dashboard API is hit. How can I do that? I was unable to find relevant documentation here - https://supertokens.com/docs/userdashboard/about My understanding is that it should be similar to api_overrides where we can override the API for Dashbaord. Is this correct? Dashboard APIs - 1. https://app.swaggerhub.com/apis/supertokens/CDI/3.0.4#/Dashboard%20Recipe/getAllSessionsForDashboardUser 2. https://supertokens.com/docs/python/recipe/dashboard/index.html 3. https://supertokens.com/docs/python/recipe/dashboard/api/index.html I have other overrides too for signup and signin. Can dashboard overrides be done and used along with my existing overrides\?
r
hey @sehzpaul dashboard overrides currently doesn't allow overriding its APIs. Instead, what you can do is to add a custom middleware before the supertokens middleware and check for the method and path of the request. If it matches that of the dashboard dleete API, you can run your custom logic.
s
Cool. If that is the only way, then I will implement this. Thank you! Is implementing this on dashboard part of the roadmap?
r
not this, but we will make the delete function overridable which is called by the dashboard. So in effect, it achieves what you want
s
Great! Thank you @rp_st and team
4 Views