In the signinuppost function I'm overriding it and...
# support-questions
i
In the signinuppost function I'm overriding it and doing an API call with the user's access token to get their discord user data. This works, but I'm wondering how I pass this info to the session. I have overriden the session function as well, so do I just pass this variable through the usercontext?
r
hey
i
Hi!
r
the session function is called in the originalImplementation.signinuppost function
so if you are overriding the
signinuppost
function and using the access token after the originalImplementation returns, then updating the user context won't help
Instead, the return
originalImplementation.signinuppost
is an object that contains the
session
object
you can use
session.updateAccessTokenPayload
to update the payload info.
i
I'm a bit confused, I don't notice the session object being in the signinuppost original implementation, at least in Go. Here's my pastebin: https://pastebin.com/kazrUJiS
Copy code
go
type SignInUpPOSTResponse struct {
    OK *struct {
        CreatedNewUser   bool
        User             User
        Session          sessmodels.SessionContainer
        AuthCodeResponse interface{}
    }
    NoEmailGivenByProviderError *struct{}
    FieldError                  *struct{ ErrorMsg string }
}
i
OHH
it's part of the ok struct
r
yea. cause only if is OK, will there be a session
i
I see!
r
in other situations, there is no session created
i
okay that makes a lot of sense, thank you