CDP Frontend SDK
    Preparing search index...

    Function useGetAccessToken

    • Hook to get the access token for the current user.

      Returns { getAccessToken: () => Promise<null | string> }

      Function to get the access token for the current user

      const { getAccessToken } = useGetAccessToken();

      const handleGetAccessToken = async () => {
      const accessToken = await getAccessToken();
      console.log("Access Token:", accessToken);
      };