dleangen
08/15/2022, 7:06 AMdleangen
08/15/2022, 7:12 AMSee all the functions that can be overrided here: https://supertokens.com/docs/nodejs/modules/recipe_thirdpartyemailpassword.html#RecipeInterface
I am guessing that the information I need about Sessions is here: https://supertokens.com/docs/nodejs/modules/recipe_session.html
Is that correct?
What I am trying to understand, and it is not clear to me from the docs, is:
1. What functions can I override? And
2. What precisely do those functions do, and when are they called?
I was hoping that by reading the docs, I could understand what I need to do to properly manage my Firebase sessions.rp_st
08/15/2022, 7:14 AMdleangen
08/15/2022, 7:17 AMrp_st
08/15/2022, 7:23 AMts
Session.init({
override: {
functions: (oI) => {
return {
...oI,
refreshSession: async function (input) {
let session = oI.refreshSession(input);
// TODO: update firebase token in session...
return session;
}
}
},
apis: (oI) => {
return {
...oI,
signOutPOST: async function (input) {
let session = await Session.getSession(input.options.req, input.options.res, input.userContext);
// TODO: revoke firebase session..
return oI.signOutPOST!(input);
}
}
}
}
})
dleangen
08/15/2022, 7:24 AMrp_st
08/15/2022, 7:30 AM