Hey, i'm customizing both my signUPPost api for Em...
# support-questions-legacy
d
Hey, i'm customizing both my signUPPost api for EmailPassword recipe, and the Session createNewSession to inject my own db user inside the token payload, but it crash because it seems to trying to first create the session before signing up the user. Don't understand the logic behind this
r
hey @DollarNavalex you sohuld override the override.functions and not override.apis for this
signUpPOST calls the override.functions.signUp in the emailpassword recipe and also the override.functions.createNewSession in the session recipe.
d
hmm. But I can't access to the aditionnal fields by overriding the override.functions no ?
r
You can. Using the user context.
You can directly read from request jain
Json*
Or set the additional files in the user context in the api override and then access it in the function override
d
hmm
How do i access the context in the function override ?
Because on the wiki you suggest to override the api to access those fields :/
r
The input args as the user context
d
Is there any type def of the input object somwehere ?
r
supertokens.com/docs/nodejs
d
Okay so, to get the body i should go in
input.userContext._default.request.parsedJSONBody
?
d
Oh
r
You can get a typed version of the request object which will make it easier for you to read from it
d
You have made an helper function to parse this ? 🙂
r
Yes
d
Yeah clearly, i'll try this out