https://supertokens.com/ logo
Docs
Join the conversationJoin Discord
Channels
community
contributing
general
github-activity
info
introductions
new-releases
random
security
support-questions
welcome-0xdelusion
welcome-aj-ya
welcome-aleksandrc
welcome-alpinjs
welcome-amberlamps1
welcome-andrew-rodriguez
welcome-ankit-choudhary
welcome-anthony-stod-custodio
welcome-call-in
welcome-chwalbox
welcome-claybiokiller
welcome-co7e
welcome-cosmoecwsa
welcome-devdag
welcome-dinso
welcome-drebotelho
welcome-elio
welcome-ernest
welcome-foxbarrington
welcome-fromscratch
welcome-galto4ir
welcome-goetzum
welcome-hay-kot
welcome-himanshu-kukreja
welcome-hossambarakat
welcome-ichikawakazuto
welcome-jahir9991
welcome-jamesl
welcome-jerry123424
welcome-john-oliver
welcome-jonas-alexanderson
welcome-jxyz
welcome-kelvinwop
welcome-kraz
welcome-lancekey
welcome-leoo
welcome-lukeacollins
welcome-m-j-mon
welcome-malik-khoja
welcome-marco
welcome-mardadi
welcome-meshguy
welcome-metamorph
welcome-mike-tectu
welcome-mirzok
welcome-mozomig
welcome-naberyou66_
welcome-nacer
welcome-namratha
welcome-naveenkumar
welcome-nightlight
welcome-nischith
welcome-notankit
welcome-olawumi
welcome-pavan-kumar-reddy-n
welcome-pineappaul
welcome-poothebear
welcome-rick
welcome-samuel-qosenergy
welcome-samuelstroschein
welcome-shubhamgoel23
welcome-shubhamkaushal
welcome-sidebar
welcome-surajsli
welcome-suyash_
welcome-syntaxerror
welcome-tauno
welcome-tauno
welcome-tawnoz
welcome-teclali
welcome-tls
welcome-turbosepp
welcome-vikram_shadow
welcome-yann
Powered by Linen
support-questions
  • r

    rp

    07/20/2021, 8:34 PM
    Cause signing out is a function of the session being revoked
  • r

    rp

    07/20/2021, 8:35 PM
    but yea.. i get your point. It's more intuitive if it's in the
    ThirdPartyEmailPassword
    . Perhaps you could create an issue about this and we can deal with it soonish..
  • r

    rp

    07/20/2021, 8:36 PM
    But until then, i'm afraid that you will have to have the
    SUCCESS
    check in the
    ThirdPartyEmailPassword.init
    and the
    SIGN_OUT
    check in the
    Session.init
  • r

    rp

    07/20/2021, 8:36 PM
    https://supertokens.io/docs/session/advanced-customizations/frontend-hooks/handle-event
  • s

    sahil-shubham

    07/20/2021, 8:38 PM
    I see, how do "SUCCESS" and "SESSION_CREATED" context action differ then?
  • r

    rp

    07/20/2021, 8:39 PM
    With SUCCESS, you can know if it's a sign up or sign in. However with SESSION_CREATED, you can't know that.
  • s

    sahil-shubham

    07/20/2021, 8:40 PM
    Okay, so I have the option of moving all the post sign up/in and sign out events to session.init
  • s

    sahil-shubham

    07/20/2021, 8:40 PM
    It seems better as I am not making use of this difference.
  • r

    rp

    07/20/2021, 8:40 PM
    yea.. then move it all in session.init.. no problem!
  • s

    sahil-shubham

    07/20/2021, 8:40 PM
    Sure, I will make an issue regarding it.
  • s

    sahil-shubham

    07/20/2021, 8:41 PM
    Thanks again.
  • r

    rp

    07/20/2021, 8:41 PM
    Also, since you have upgraded to 0.15, it has a breaking change for how components override works. The function signature has changed slighty.
  • r

    rp

    07/20/2021, 8:42 PM
    The components override API has changed from
    (DefaultComponent) => (props) => React.Element
    to
    ({ DefaultComponent, …props }) => React.Element
    .
  • s

    sahil-shubham

    07/20/2021, 8:51 PM
    Okay, got it.
  • r

    rp

    07/20/2021, 8:52 PM
    It had to be done cause the older way had a bug that would cause your custom component’s state to be forgotten on rerender
  • s

    sahil-shubham

    07/20/2021, 8:53 PM
    There's another issue, I think because of the page refresh just after sign up, the GET request that is supposed to run on SIGN_OUT gets aborted, more specifically "NS_BINDING_ABORTED"
  • r

    rp

    07/20/2021, 8:53 PM
    Ahhhhh I see
  • r

    rp

    07/20/2021, 8:53 PM
    Yeaaa. So that’s tricky
  • s

    sahil-shubham

    07/20/2021, 8:54 PM
    Oh, what do you mean by forgotten? Why did that happen?
  • s

    sahil-shubham

    07/20/2021, 8:54 PM
    Yep 😅
  • r

    rp

    07/20/2021, 8:55 PM
    By forgotten, I meant that the component would be remounted. So the state would be reset. It happened cause earlier, we would render the component returned from the function as opposed to treating the function itself as a component (which happens now)
  • r

    rp

    07/20/2021, 8:56 PM
    So the way I would solve that is that whenever you call the sign out function, after that, you should send the axios call and then do the redirection. As opposed to listening for the event
  • r

    rp

    07/20/2021, 8:57 PM
    Or, you do the redirection using react router Dom which doesn’t lead to a page reload. So your axios would not get cancelled
  • s

    sahil-shubham

    07/20/2021, 8:58 PM
    Hmm, so overriding the function like you mentioned before.
  • s

    sahil-shubham

    07/20/2021, 8:59 PM
    I understand, thanks for the explanation.
  • r

    rp

    07/20/2021, 9:00 PM
    Yea.. thought could work too.
  • s

    sahil-shubham

    07/20/2021, 9:01 PM
    No worries, I will try that. It's good finding issues.
  • m

    mantis

    07/21/2021, 4:15 PM
    Hey. I am getting 401s in Safari. I seem to be running afoul of cross-site tracking.
  • r

    rp

    07/21/2021, 4:16 PM
    I would need more context to help debug: - What's your website domain - Are you using iframes? - What's your api domain? - Your frontend and backend init config
  • m

    mantis

    07/21/2021, 4:17 PM
    Should we do that here or in PM?
Powered by Linen
Title
m

mantis

07/21/2021, 4:17 PM
Should we do that here or in PM?
View count: 3