Assuming you are using ThirdPartyEmailPassword, yo...
# support-questions
r
Assuming you are using ThirdPartyEmailPassword, you want to do the following on your backend:
Copy code
Session.init({
    override: {
        functions: (originalImplementation) => {
            return {
                ...originalImplementation,
                createNewSession: async (input) => {
                    let userId = input.userId;
                    let user = await ThirdPartyEmailPassword.getUserById(userId);
                    input.jwtPayload = {
                        ...input.jwtPayload,
                        email: user.email
                    };
                    return originalImplementation.createNewSession(input);
                }
            };
        }
    }
});
2 Views