yoagauthier
08/31/2023, 11:30 AMSession.init({
override: {
functions: originalImplementation => {
return {
...originalImplementation,
createNewSession: async input => {
const email = 'test@test.com';
input.accessTokenPayload.email = email;
return originalImplementation.createNewSession(input);
},
};
},
},
}),
},
Then on my frontend :
const session = useSessionContext();
console.log('sessionContext', session);
This works when the user first logs in ("test@test.com" is present in the payload), but then when my app makes other requests, it disappears from the payload (see screenshot). I'm having trouble to understand why.
Does supertokens make updates to the payload during calls on my app ? Is there another function that I need to override ?