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
  • n

    nxteword

    12/13/2020, 8:24 AM
    Hey @User, we decided to go with only express, so no need to prioritise making flask one work with express, you can prioritise other things if needed, thanks.
  • r

    rp

    12/13/2020, 8:25 AM
    @User thanks for letting me know. So will you be using supertokens with express then?
  • n

    nxteword

    12/13/2020, 8:25 AM
    Yes.
  • r

    rp

    12/13/2020, 8:25 AM
    sounds good!
  • n

    nxteword

    12/13/2020, 8:46 AM
    Also, I'm using typescript with express and I'm trying to load
    connectionURI
    from
    process.env.SUPERTOKENS_URI
    , it looks like the type for it is
    string | undefined
    , and type for
    connectionURI
    is string, so I'm unable to assign this, is there a workaround for this other than adding
    // @ts-ignore
    above it?
  • r

    rp

    12/13/2020, 8:48 AM
    So this is a conscious design decision from our side so that it doesn't get missed from the user. What you can do is something like:
    ts
    let connectionURI: string | undefined = process.env.SUPERTOKENS_URI;
    
    if (connectionURI === undefined) {
      throw new Error("Please provide the SuperTokens connectionURI");
    }
    
    supertokens.init({...})
    This way, I think TS will stop throwing the error.
  • n

    nxteword

    12/13/2020, 8:49 AM
    Hahah, just did that
  • r

    rp

    12/13/2020, 8:49 AM
    hahahaha
  • r

    rp

    12/13/2020, 8:49 AM
    👍
  • n

    nxteword

    12/13/2020, 8:49 AM
    Oh actually wait
  • n

    nxteword

    12/13/2020, 8:49 AM
    I did this
    const connectionURI = process.env.SUPERTOKENS_URI || "https://try.supertokens.io";
  • n

    nxteword

    12/13/2020, 8:50 AM
    But I think your solution is safer one.
  • r

    rp

    12/13/2020, 8:51 AM
    technically, that works, but
    try.supertokens.io
    is not meant for any production use. It's only meant for trying out supertokens quickly. So I would still prefer to throw an error or something in case
    process.env.SUPERTOKENS_URI
    is
    undefined
  • n

    nxteword

    12/13/2020, 8:51 AM
    Yeah, correct.
  • n

    nxteword

    12/13/2020, 8:51 AM
    Thanks.
  • r

    rp

    12/13/2020, 8:51 AM
    Also, I edited the code snippt above to throw an error in the IF statement
  • n

    nxteword

    12/13/2020, 8:52 AM
    Okay cool, thanks.
  • n

    nxteword

    12/13/2020, 8:52 AM
    We can use const right? any reason for using let?
  • r

    rp

    12/13/2020, 8:52 AM
    yea const works. I'm just used to using
    let
    instead
  • n

    nxteword

    12/13/2020, 8:52 AM
    Ah okay cool, thanks.
  • n

    nxteword

    12/15/2020, 6:16 PM
    Hey rp, so I'm trying to use supertokens with next following this guide - https://supertokens.io/docs/emailpassword/nextjs/supertokens-with-nextjs, but I'm using typescript and in step 2 ,
    EmailPassword.init()
    and
    Session.init()
    are causing error saying
    An argument for 'config' was not provided.
    , I think you have to make config argument optional in type definition? I'm new to typescript, can you please suggest a solution? Thanks.
  • r

    rp

    12/16/2020, 5:15 AM
    hey @User thanks for pointing it out
  • r

    rp

    12/16/2020, 5:15 AM
    Fixing it now. Should be available in 10-15 mins
  • r

    rp

    12/16/2020, 5:25 AM
    @User I have released version 0.2.2 with the typescript fix. Please lmk if the error still persists. Thanks
  • n

    nxteword

    12/16/2020, 8:27 AM
    Sure, thanks.
  • r

    rp

    12/16/2020, 6:54 PM
    hey @User you should update supertokens-node to
    3.2.1
    . It has a few important fixes
  • r

    rp

    12/16/2020, 6:54 PM
    thanks
  • n

    nxteword

    12/17/2020, 2:17 AM
    Sure, thanks for the heads up.
  • u

    user

    12/17/2020, 3:03 AM
    Hey there came across Supertokens while trying to implement an auth flow with faunadb + third party auth(outseta)+ nextjs After a user login in i pass a JWT to the an endpoint where i validate and issue a faunadb access token for that user. i'm wondering how to go about using superTokens to manage the session of that user? is it possible to use the supertoken with faunaDB feature standalone?
  • r

    rp

    12/17/2020, 3:06 AM
    hey @User Have you seen: https://supertokens.io/docs/emailpassword/common-customizations/sessions/using-with-faunadb
Powered by Linen
Title
r

rp

12/17/2020, 3:06 AM
hey @User Have you seen: https://supertokens.io/docs/emailpassword/common-customizations/sessions/using-with-faunadb
View count: 1