Use user credentials to authorize calls to internal API from custom panel plugin

Hi,

I’m developing custom panel plugin that makes some requests to my backed API (simple HTML table with some actions for each row like delete or update). I’m using generic oauth for user authentication - it communicates with my identityserver4 and login works fine. I’m wondering if it’s possibile to use auth cookie grafana_session to authorize calls to my API. I’ve already set with credentials flag to include auth cookie with my fetch calls but it didn’t helped (cookie is forwarded with request but its not authorized). I’d like to ask if such flow is possibile? Is it possibile to get logged in user token in panel plugin so simple bearer token could be used for auth? Or maybe I should use diffrent kind od authentication for such scenerio?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.