How to update idTokenClaims for express-openid-connect

Please include the following information in your post:

I have a use case where I need to update the users idTokenClaims (req.oidc.idTokenClaims email_verified field in my node web/express application once the user has verified its email.

Currently if the user verifies his email and I try to do a silent login as stated here with a next js example, but the information inside req.oidc.idTokenClaims do not update after the re-login is successful

Additionally I saw the same question asked here but it has not been answered.

code snipite:


server.get("/user", requiresAuth(), async (req, res) => {
    return res.status(200).json(req.oidc.idTokenClaims);
});

server.get("/refresh", (req, res) => {
  res.oidc.login({
    authorizationParams: {
      prompt: "none",
    },
    returnTo: `http://localhost:${port}`,
  });
});