How to pass username and password for basic authentication to grafana while using node.js and apache server?

I have a login screen that coded with js and runs on a node.js server. I have an apache lounge server that listens to node server and I have a grafana dashboard that show the data. I need to bypass the grafana authentication. To do that I am trying to send userdata from apache server to grafana with basic authentication. When I’m tring to send data only with apache server I can send data and baypass the grafana authentication. But when I’m trying to send data from node server to grafana with apache server I can’t send data to grafana server.
Here is the sample of my code.

app.get(’/dashboard’,(req,res) => {
if(session.userdata =‘ok’){
var options = {
auth: {
user : req.session.userName,
password : req.session.password

you have to use the share link of the panel then you dont need to login.

@melrose If I am embedding entire grafana dashboard using iframe similarly, I need to pass basic auth details to grafana in order to avoid the grafana login page. How can I approach that ?