```func updateSessionWithResults(w http.ResponseWr...
# support-questions
t
Copy code
func updateSessionWithResults(w http.ResponseWriter, r *http.Request, results *models.Profile) error {
    sessionContainer := session.GetSessionFromRequestContext(r.Context())

    currAccessTokenPayload := sessionContainer.GetAccessTokenPayload()
    currAccessTokenPayload["profile"] = results
    log.Println(results)
    err := sessionContainer.UpdateAccessTokenPayload(currAccessTokenPayload)
    if err != nil {
        err = supertokens.ErrorHandler(err, r, w)
        if err != nil {
            return err
        }
    }

    return nil
}