The documentation around Personal Access Tokens mentions using the browser context type PAT for public portals and specifically mentions iframes. I’m working on a simple proof of concept to display a dashboard via an iframe using PAT. I like this potential solution for embedding a single dashboard as it is faster than rebuilding the visualizations outside of DHIS2 with chartJS.
I’ve had to tweak some x-frame-options in NGINX to specify fame ancestors to get to the DHIS2 Login page. However, now that I am using the PAT to authenticate and specifying the iframe src as a dashboard page I am continually redirected back to the login page. It is the same behavior as if I was requesting the dashboard page via the API.
Basically, I’m not sure what question to ask now - I don’t know what is driving DHIS2 to return the login page even with correct authentication. I assume it has to do with the type of data that can be returned.
I’m asking for help with my next bread crumb to solve this issue or better yet, if someone else knows how to do it!
Hi @Gassim - I want to share a dashboard, however even a visualization would be nice. Can you instruct me on how to find the "external access sharing setting? I can’t seem to find it (superuser privileges). I’m referencing these docs: