Question about ```response.session.mergeIntoAccess...
# support-questions-legacy
f
Question about
Copy code
response.session.mergeIntoAccessTokenPayload()
after overriding api
Copy code
signInPOST
and getting a
Copy code
response
I try to merge to access token payload but do not see the value when I
Copy code
console.log()
the accessTokenPayload.
r
hey @funk101
can you please share some code snippet for what you are doing?
f
Copy code
signInPOST: async function (input) {
                if (originalImplementation.signInPOST === undefined) {
                  throw Error("Shouldn't come here");
                }
                try {
                  const response = await originalImplementation.signInPOST(
                    input
                  );
                  if (response.status === "OK") {
                    const currentAccessTokenPayload =
                      response.session.getAccessTokenPayload();
                    await response.session.mergeIntoAccessTokenPayload({
                      ...currentAccessTokenPayload,
                      message: "Hello World",
                    });
                    console.log("Payload: ", currentAccessTokenPayload);
                  }
                  return response;
                } catch (err) {
                  console.log("signInPOST: ", err);
                }
              },
should I see that payload where the console.log() is?
This is what I get ->
Copy code
Payload:  {}
r
thats cause you have created the variable
currentAccessTokenPayload
before calling
mergeIntoAccessTokenPayload
..
f
right I see that now, thanks
7 Views