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
general
  • r

    rp

    06/07/2020, 10:38 AM
    Your welcome!
  • r

    rp

    06/09/2020, 9:51 AM
    Hello @User
  • n

    nithin

    06/09/2020, 9:51 AM
    Yess😊
  • r

    rp

    06/09/2020, 9:51 AM
    What brings you to our server?
  • n

    nithin

    06/09/2020, 9:52 AM
    Jwt tokens
  • n

    nithin

    06/09/2020, 9:53 AM
    Also i have a doubt regarding jwt in android
  • r

    rp

    06/09/2020, 9:54 AM
    alright! are you planning on using SuperTokens for session management? Or is this a general JWT token doubt?
  • n

    nithin

    06/09/2020, 9:55 AM
    Nop.....sorry supertoken...jwt name still in my touge😂 😂
  • r

    rp

    06/09/2020, 9:56 AM
    haha fair enough. So I assume that you are planning on using SuperTokens. What's your question?
  • n

    nithin

    06/09/2020, 10:01 AM
    How long can we have stay tokens valid for android?
  • r

    rp

    06/09/2020, 10:03 AM
    however long you want. For example, if you want sessions to stay alive for 1 month (user will get logged out after 1 month of inactivity), then you have to set the
    refresh_token_validity
    value to
    43800
    (1 month in mins).
  • r

    rp

    06/09/2020, 10:03 AM
    This will automatically manage the tokens on android to be valid for 1 month
  • s

    Sun Walker

    06/11/2020, 5:10 PM
    Hey @User what command should I use to create my supertokens container EDIT nevermind found all config here https://hub.docker.com/r/supertokens/supertokens-postgresql
  • s

    Sun Walker

    06/11/2020, 5:18 PM
    Also where is the location of the config file that you can edit?
  • s

    Sun Walker

    06/11/2020, 6:03 PM
    My licensekey says 'production'? i start my docker instance in 'dev' what does this mean?
  • s

    Sun Walker

    06/11/2020, 8:34 PM
    I keep getting this error:
    Error connecting to PostgreSQL instance. Please make sure that PostgreSQL is running and that you have specified the correct values for 'postgresql_host' and 'postgresql_port' in your config file
  • s

    Sun Walker

    06/11/2020, 8:35 PM
    I made container like this:
    docker run \
        --name supertokens_container \
        -p 3567:3567 \
        -v /Users/Stephano/Development/code/app/support/setup/arch_supertokens/config.yaml:/usr/lib/supertokens/config.yaml \
        -v 
    /Users/Stephano/Development/code/app/support/setup/arch_supertokens/licenseKey:/usr/lib/supertokens/licenseKey \
        -d supertokens/supertokens-postgresql dev
  • s

    Sun Walker

    06/11/2020, 8:36 PM
    run like this
    docker start supertokens_container
  • s

    Sun Walker

    06/11/2020, 8:44 PM
    I think I need to migrate from 1.0 to 2.0 what do i need to change?
  • s

    Sun Walker

    06/11/2020, 9:23 PM
    And this code no longer works because of revoke session
    JavaScript
    export const attemptRefreshSession = async (req: Request, res: Response) => {
      try {
        await refreshSession(req, res);
        return env !== 'development' ? true : developmentCookieResponse(res);
      } catch (err) {
        const authError = Error.isErrorFromAuth(err);
    
        if (authError && err.errType === Error.UNAUTHORISED) {
          throw createHttpError(440, {
            message: 'Unauthorized. Please Login.',
            err,
          });
        }
        if (authError && err.errType !== Error.GENERAL_ERROR) {
          const sessionHandle = err?.err?.sessionHandle;
          const successfulRevoke = await revokeSessionUsingSessionHandle(
            sessionHandle
          );
          throw createHttpError(440, {
            message: `${successfulRevoke ? 'Session Revoked. ' : ''}Please Login.`,
            err,
          });
        }
        throw createHttpError(500, { err });
      }
    };
  • s

    Sun Walker

    06/11/2020, 9:35 PM
    supertokens-node 2.0.2 is broken
  • s

    Sun Walker

    06/11/2020, 9:36 PM
    import supertokens from 'supertokens-node';
    console.log(supertokens)
  • s

    Sun Walker

    06/11/2020, 9:36 PM
    > undefined
  • n

    nkshah2

    06/12/2020, 4:23 AM
    @Sun Walker I think you're meant to import it like this
    import * as supertokens from 'supertokens-node'
    This if from the docs https://supertokens.io/docs/nodejs/usage-with-express/user-login#example
  • r

    rp

    06/12/2020, 5:54 AM
    Hey @User > Also where is the location of the config file that you can edit? The config.yaml file in the docker container is located at /usr/lib/supertokens/config.yaml > My licensekey says 'production'? i start my docker instance in 'dev' what does this mean? Starting the docker image in dev mode means that you want to use it for development. This is independent to do with the licenseKey being in production. The difference between starting supertokens in dev or production mode is explained here: https://supertokens.io/docs/community/cli/start#starting-in-a-development-environment > I keep getting this error: Did you fix this error? I saw you had opened an issue on github about this, but it's not there anymore. Let me know. > I think I need to migrate from 1.0 to 2.0 what do i need to change? You should not need to change any of the nodeJS code for this.
  • r

    rp

    06/12/2020, 5:55 AM
    Thanks @User
  • n

    nkshah2

    06/12/2020, 5:56 AM
    Happy to help
  • s

    Sun Walker

    06/13/2020, 8:59 AM
    Hey, Got a quick question: Just installed supertokens-react-native and added the necessary functions to mainapplication.java.
  • s

    Sun Walker

    06/13/2020, 8:59 AM
    But on IOS I get this error on app load
  • s

    Sun Walker

    06/13/2020, 8:59 AM
    message has been deleted
Powered by Linen
Title
s

Sun Walker

06/13/2020, 8:59 AM
message has been deleted
View count: 2