Show Popup/Alert Before Logging Out With GetAccesTokenSilently

Got the solution from another thread Check session without extending it. We can do like this:-

getAccessTokenSilently()
      .then((token) => {
        console.log(token);
      })
      .catch((e) => {
        if (e.error === "login_required")
          alert("logging out");
      });

Thanks :slight_smile:

2 Likes