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

    Ankur Tyagi

    01/07/2022, 7:40 AM
    Welcome & Hello Ambassadors. πŸ™Œ
  • v

    VanshikaSrivastava

    01/07/2022, 9:17 AM
    Hello all, Vanshika here ! Thanks for the invite @User πŸ™Œ
  • p

    Puru

    01/07/2022, 10:20 AM
    Hi all, Puru here. Thanks to @User Tyagi for inviting me to the Ambassador program πŸ™‡β€β™‚οΈ
  • a

    Ankur Tyagi

    01/07/2022, 2:42 PM
    @User could you please ping @rp to get started with GitHub contributions
  • r

    rp

    01/07/2022, 2:43 PM
    @User , there is a contributing channel here. You can post your message there.
  • s

    smoleniuch

    01/07/2022, 7:09 PM
    I am trying to translate some parts of form but i find it hard to do so.I am trying to translate "or" divider and "continue with facebook" label.Is this possible with build in components?
  • r

    rp

    01/07/2022, 7:11 PM
    You could run JS in a useEffect, find those elements using DOM functions and change the text
  • r

    rp

    01/07/2022, 7:12 PM
    We don’t have translatable components yet. But will probably work on it soonish.. until then, the above recommendation is the best way.
  • s

    smoleniuch

    01/07/2022, 7:20 PM
    Thanks for the solution
  • u

    user

    01/08/2022, 4:24 AM
    Are websockets supposed to work on a golang backend when wrapped with the supertokens verification wrapper?
  • u

    user

    01/08/2022, 4:24 AM
    Seems the DoneWriter doesn't implement Hijack which is required to upgrade a connection to a websocket
  • r

    rp

    01/08/2022, 4:25 AM
    I don't think websockets will work with the verification wrapper function. Haven't tried that yet.
  • r

    rp

    01/08/2022, 4:26 AM
    If you want, you can make an issue about this on our github and we can check it out sometime in the coming days.
  • r

    rp

    01/08/2022, 4:26 AM
    or even raise a PR to add support for this?
  • r

    rp

    01/08/2022, 4:37 AM
    As a work around, you can enable the JWT feature, and use a JWT for auth in websockets.
  • u

    user

    01/08/2022, 4:43 AM
    my usecase is basically to use supertokens for a bunch of API requests, and also to authenticate a proxied websocket, so basically I'm just using supertokens to authenticate the connection and then proxy the entire websocket connection to another server (with some additional injected authentication headers)
  • u

    user

    01/08/2022, 4:43 AM
    It's a bit of a weird usecase
  • r

    rp

    01/08/2022, 4:46 AM
    hmm. I'm not sure I quite understand what "authenticate a proxied websocket" means - What is proxied websockets? Is the socket connection from the frontend to the backend? Or from backend to backend?
  • u

    user

    01/08/2022, 4:50 AM
    So basically 1. Browser initiates connection with API server using supertokens cookies 2. API server validates supertokens cookies and opens websocket connection with backend server with an authorization header 3. backend server validates authorization header and starts streaming data to the API server 4. API server proxies all data between the backend server and browser
  • r

    rp

    01/08/2022, 4:50 AM
    Ahh i see.
  • u

    user

    01/08/2022, 4:51 AM
    The key thing that makes this kinda hard is the backend server isn't "trusted" and so it will have no access to literally anything.
  • r

    rp

    01/08/2022, 4:51 AM
    So the issue is coming in step (2)? Where you are unable to open a socket connection to the backend server?
  • u

    user

    01/08/2022, 4:52 AM
    No that part works fine
  • u

    user

    01/08/2022, 4:52 AM
    The part that doesn't work is the responsewriter that supertokens returns is incapable of hijacking the connection
  • u

    user

    01/08/2022, 4:52 AM
    so it can't upgrade the connection between the browser and the API server to a websocket
  • u

    user

    01/08/2022, 4:55 AM
    I'm pretty sure it's because supertokens is wrapping the responsewriter like this
  • r

    rp

    01/08/2022, 4:56 AM
    Oooooo! I see.
  • r

    rp

    01/08/2022, 4:56 AM
    What do you suggest?
  • u

    user

    01/08/2022, 4:57 AM
    implementing http.Hijack would totally solve the problem
  • r

    rp

    01/08/2022, 4:57 AM
    So the
    DoneWriter
    is a child of
    ResponseWriter
Powered by Linen
Title
r

rp

01/08/2022, 4:57 AM
So the
DoneWriter
is a child of
ResponseWriter
View count: 2