Hello, I am trying to add extra key in session tok...
# support-questions-legacy
n
Hello, I am trying to add extra key in session token called "org_id"
Copy code
SessionNode.init({
        override: {
          functions: (originalImplementation) => {
            return {
              ...originalImplementation,
              createNewSession: async function (input) {
                // This goes in the access token, and is available to read on the frontend.
                input.accessTokenPayload = {
                  ...input.accessTokenPayload,
                  org_id: 'someValue',
                };

                return originalImplementation.createNewSession(input);
              },
            };
          },
        },
      }),
but when i try to read on backend console.log(_opts.session?.getAccessTokenPayload().customClaim); It's return undefined, Any clue where I am doing wrong ?
3 Views