Question I notice in frontend event overide it was...
# support-questions
a
Question I notice in frontend event overide it was using context. and when I inspect it in console there was a userContext object in there. Is that object different than input.userContext in backend? Because when I assign a value there, the frontend context.userContext is empty.
r
Hey! Yea. The userContext object is isolated per API call essentially.
And setting it on the backend doesn’t affect it on the frontend. And vice versa
a
owh okay, so the way to pass value from backend and frontend is using accessTokenPayload then?
r
Yea. But that’s nothing to with userContext
a
tried adding value to token payload via response from override third party. I check there is session object in the response
Copy code
js
await response.session.updateAccessTokenPayload({
                    userName: userProfile.name,
                    email: response.user.email, 
                    ...currTokenPayload
                  })
But when I call it in the front end, the token payload is empty Is the above instance is different?
r
Hmmm. Can I see the whole code for how you are adding to the payload?
a
then in frontend
using NextJs
r
Haha you wrapped the user profile info component in an auth wrapper?
Like ThirdPartyEmailPasswordAuth
a
yes
r
Hmm. Then it should reflect
a
Copy code
js
export const AuthWrapper = dynamic(
  new Promise((res) => {
    res(ThirdPartyEmailPasswordAuth)
  }),
  {ssr: false}
)
r
Can you print out on the output of useSessionContext()?
Can you print something out on the backend where you call updateAccessTokenPayload? Just to make sure it’s being called?
a
okay wait
ahh there is no need, found the problem, some variable call error.
r
Cool!