👋 I'm using the Node SDK and wondering about addi...
# support-questions-legacy
n
👋 I'm using the Node SDK and wondering about adding to the access token payload. e.g. code like this:
Copy code
await session.mergeIntoAccessTokenPayload({
  _url_slug: urlSlug,
  _internal_user_id: userData.id
});
do those custom keys get persisted in a sticky way across sessions? Or are they lost on session refresh / if the user logs in on a different device for ex.
r
Hey @n8levine. They are persisted across session refreshing. But don’t get replicated into other device’s sessions.
n
Ah okay thanks. What would be the best way to ensure that certain keys are always set then (i.e. on sign-in and sign-up). I know you can override those sign-in/up methods, which I've been doing w/ the ThirdPartyEmailPassword recipe. But can you trivially access the session inside there too and add to the payload?
r
yes you can. You can override the createNewSession function in the session recipe and add the custom claims there.
n
Okay I see. But I mean, can you also access the session and add to the access token payload when you override
emailPasswordSignUp
for ex. ?
r
Then override.apis yea, not the override.functions, since the session hasn’t been created when the override.functions is run for emailpassword login. But during the override.apis, the session gets created and is returned as a result of calling it’s original impl