title: Passing Data from node js to html
body: <p>I am connecting to an authentication server which is returning the credentials and calling to my call back method. How do I pass the authenticated values back to the html to render?</p>
  <p>Here is my code</p>
  <pre><code>function getHomePage()
  {
     // alert(&quot;here in ajax call&quot;)
  
      $.ajax({
          url: &quot;/calloidcServer&quot;,
          headers:{
              'Access-Control-Allow-Methods':'POST, PUT, OPTIONS, DELETE, GET',
          'Access-Control-Allow-Origin':['https://localhost:3000','https://localhost:9031'],
          'Access-Control-Allow-Headers':'Origin, X-Requested-With, Content-Type, Accept',
          'Access-Control-Allow-Credentials':true,
          'Content-Type':'application/json',
          },
          type: &quot;GET&quot;,
          
          success: function (resp) {
              console.log(resp)
              
              $('#testoidc').append(resp);
          
          },
          error: function (resp, status, error) {
              
          }
  
      });
  
  
  }
  
  
  
  app.get(&quot;/calloidcServer&quot;,function (req, res, next) {
    console.log('-----------------------------');
    console.log('/Start login handler');
    next();
  
    
  },
  passport.authenticate('oidc',{scope:&quot;openid&quot;})
  )
  
  app.get('/callback',(req,res,next) =&gt;{
  
    console.log(&quot; call back from auth server here&quot;)
  passport.authenticate('oidc',{ successRedirect: '/user',
  failureRedirect: '/' })(req, res, next)
  
  
    }
  )
  
  app.get (&quot;/user&quot;,(req,res) =&gt;{
    res.header(&quot;Content-Type&quot;,'application/json');
  
    var id_token_decode=jwt_decoder(req.session.tokenSet.id_token);
    var decoded = jwt_decoder(req.session.tokenSet.access_token); 
    console.log(id_token_decode)
    console.log(decoded);
    console.log(path.join(__dirname + '/public/citizenHome.html'))
   
    res.redirect(&quot;/citizenHome.html&quot;)
    //res.send(JSON.stringify({tokenset:req.session.tokenSet,userinfo:req.session.userinfo},null,2));
  
  })
  </code></pre>
  <p>When I redirect to citizenHome.html, I want to send back some data to it to show in the html? I have not used any view engine.</p>