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
security
  • s

    Sun Walker

    06/18/2020, 9:07 AM
    Hey @User you're the best person to ask about this. I'm using a self-hosted web-server called 'TypeSense' for full-text search. To enable HTTPs it says you need an SSL certificate:
    ssl-certificate    false    Path to the SSL certificate file. You must also define ssl-certificate-key to enable HTTPS.
    ssl-certificate-key    false    Path to the SSL certificate key file. You must also define ssl-certificate to enable HTTPS.
    Why does it need one? Do I use the same certificate to make my Node server HTTPS? My react native app wont allow it to work unless it's HTTPS, (i think), how do I do it? Right now I'm just making requests from my RN app to my Server and just handling all the requests to the webserver via my own server. How comes this works and the other way doesn't?
  • s

    Sun Walker

    06/18/2020, 9:08 AM
    Do you need to regenerate these certifcates often?
  • r

    rp

    06/18/2020, 9:08 AM
    Right.. this is a long and tedious process
  • r

    rp

    06/18/2020, 9:08 AM
    wait.. 20 mins
  • s

    Sun Walker

    06/18/2020, 9:08 AM
    Hahah! okay!
  • r

    rp

    06/18/2020, 10:01 AM
    @User you basically need to buy an SSL certificate for your domain. You can do so via many websites. Once you have them, you need to install them in your nodejs server or use nginx or something in front of your nodejs app (which is what we do)
  • s

    Sun Walker

    06/18/2020, 10:03 AM
    Is it 1 certificate for all my services? node, typsesense etc?
  • r

    rp

    06/18/2020, 10:04 AM
    yup. Internal services do not need this certificate.. those can be self signed
  • s

    Sun Walker

    06/18/2020, 10:04 AM
    Ahh
  • r

    rp

    06/18/2020, 10:04 AM
    but external services which can be accessed via https://yourdomain.com will need this one certificate
  • s

    Sun Walker

    06/18/2020, 10:05 AM
    And what about React Native, If I have a Node Server, and a TypeSense server and a SuperTokens server, how does it interplay
  • r

    rp

    06/18/2020, 10:05 AM
    react native accesses your node server via https://yourdomain.com (which requires this certificate). Node server will internally access Typesense + SuperTokens server via http or https (can be a self signed cert)
  • r

    rp

    06/18/2020, 10:06 AM
    so basically your react native app should never directly talk to typesense or supertokens
  • s

    Sun Walker

    06/18/2020, 10:06 AM
    Oh 1 thing
  • s

    Sun Walker

    06/18/2020, 10:06 AM
    It needs to directly talk to TypeSense
  • s

    Sun Walker

    06/18/2020, 10:06 AM
    because the client makes search requests
  • r

    rp

    06/18/2020, 10:06 AM
    i see. SO then your typesense server will also need to use this certificate
  • s

    Sun Walker

    06/18/2020, 10:06 AM
    Same 1?
  • r

    rp

    06/18/2020, 10:06 AM
    yup
  • s

    Sun Walker

    06/18/2020, 10:07 AM
    I understand. You've explained what I really wanted to know, I can learn the implementation specifics myself. I've just misunderstood the 'why' of these things
  • s

    Sun Walker

    06/18/2020, 10:07 AM
    Thanks again dude!
  • r

    rp

    06/18/2020, 10:07 AM
    ur welcome 🙂
  • s

    Sun Walker

    06/18/2020, 10:10 AM
    Oh last thing, does this mean I would use this https://domain.com instead of localhost once I set this up? And when do I know to use 127.0.0.1 vs this specific domain I set up?
  • s

    Sun Walker

    06/18/2020, 10:10 AM
    For everything i mean
  • r

    rp

    06/18/2020, 10:10 AM
    so if you have your servers running on your computer, it's localhost or 127.0.0.1
  • r

    rp

    06/18/2020, 10:11 AM
    if they are running on aws or gcp, then it's https://domain.com
  • s

    Sun Walker

    06/18/2020, 10:11 AM
    even with the certs I can locally use 127.0.0.1?
  • r

    rp

    06/18/2020, 10:11 AM
    localally u don't need https
  • s

    Sun Walker

    06/18/2020, 10:12 AM
    For RN on IOS you do don't you?
  • s

    Sun Walker

    06/18/2020, 10:12 AM
    It isn't letting my typesense server talk to it
Powered by Linen
Title
s

Sun Walker

06/18/2020, 10:12 AM
It isn't letting my typesense server talk to it
View count: 1