https://supertokens.com/ logo
d

dhatGuy

06/13/2022, 11:01 AM
can I override the
getUserById
function?
r

rp

06/13/2022, 11:02 AM
Yea. You should be able to override this too
but I don't know where it should be defined
r

rp

06/13/2022, 11:03 AM
Im not sure I understand what you mean by how it should be defined
d

dhatGuy

06/13/2022, 11:04 AM
maybe I should ask how to override it
r

rp

06/13/2022, 11:04 AM
which backend SDK?
oh right nodejs
d

dhatGuy

06/13/2022, 11:05 AM
yes, nodejs
r

rp

06/13/2022, 11:05 AM
Copy code
ThirdPartyEmailPassword.init({
    override: {
        functions: (oI) => {
            return {
                ...oI,
                getUserById: async function (input) {
                    // TODO..
                }
            }
        }
    }
})
d

dhatGuy

06/13/2022, 11:07 AM
thanks 🙂
@rp this returns an empty object in react native
let accessTokenPayload = await SuperTokens.getAccessTokenPayloadSecurely();
r

rp

06/13/2022, 11:54 AM
then it probably means that the access token payload is empty. Are you adding something to it on the backend?
d

dhatGuy

06/13/2022, 11:56 AM
no
r

rp

06/13/2022, 11:57 AM
that's why
d

dhatGuy

06/13/2022, 11:58 AM
can I do that here?