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

    user

    05/25/2021, 7:56 PM
    @UserI was able to fix my issue by moving the file from pages/api/auth to api/auth (which is not the suggested way of doing it according to the vercel docs). I had to put the backendConfig into the serverless functions too
  • r

    rp

    05/25/2021, 7:56 PM
    awesome!!
  • r

    rp

    05/25/2021, 7:57 PM
    thanks for letting us know. When we write docs for vercel, we will keep this in mind 🙂
  • u

    user

    05/25/2021, 8:02 PM
    I will keep you updated if vercels support knows an alternative solution
  • o

    olhapi

    05/26/2021, 8:02 AM
    Hello everyone. Just started using supertokens. Is there a way to disable signups?
  • r

    rp

    05/26/2021, 8:04 AM
    hello @User disabling signups involves two steps: - Disabling the sign up API on the backend - Disabling the frontend sign up widget Before I give you more details, which recipe are you using?
  • o

    olhapi

    05/26/2021, 8:05 AM
    thx for reply. I'm using 'Third Party Email Password' in next.js
  • r

    rp

    05/26/2021, 8:13 AM
    Got it. Disabling the backend API will be very easily possible in our next release of the node SDK (coming out this week).. Once it's out, I can give you instructions on how to do that. For frontend, you will want to override the login UI to disable sign up. To do that, follow the steps in this file.
  • r

    rp

    05/26/2021, 8:14 AM
    I'd also be happy to get on a quick call to guide you around changes for the frontend as it may be a bit confusing (since we don't have official docs for it yet).
  • o

    olhapi

    05/26/2021, 8:17 AM
    thx a bunch, I'll try to figure it out myself ☺
  • r

    rp

    05/26/2021, 8:28 AM
    cool!
  • r

    rp

    05/26/2021, 8:28 AM
    feel free to ask more questions in case you are stuck,,
  • j

    jarvis

    05/26/2021, 12:26 PM
    where does Supertoken store the secret/key?
  • r

    rp

    05/26/2021, 12:26 PM
    in the db. In the
    key_value
    table.
  • r

    rp

    05/26/2021, 12:26 PM
    it stores the public and private key in there
  • j

    jarvis

    05/26/2021, 12:27 PM
    great.. Also, is there an option to use SHA512 as the algorithm instead of SHA256?
  • r

    rp

    05/26/2021, 12:29 PM
    not yet 😦
  • r

    rp

    05/26/2021, 12:30 PM
    but if you are worried about secret key being compromise, then you should know that the keys are changed regularly (the older ones are immediately revoked).
  • r

    rp

    05/26/2021, 12:31 PM
    And we do this without any user logouts... so really, using
    SHA512
    over
    SHA256
    wouldn't make too much of a difference.
  • j

    jarvis

    05/26/2021, 12:35 PM
    understood. Thanks for the quick replies 🙂
  • j

    jarvis

    05/26/2021, 5:13 PM
    I have a few more questions: 1. Can we inject supertokens as a middleware in our java services instead of having a dedicated service? 2. How does the solution take care of CSRF?
  • r

    rp

    05/26/2021, 5:15 PM
    > Can we inject supertokens as a middleware in our java services instead of having a dedicated service? No. The superotkens core needs to run as a dedicated http service. If your backend is in Java, we only have a Javalin SDK at the moment. > How does the solution take care of CSRF? https://supertokens.io/docs/session/common-customizations/sessions/anti-csrf
  • j

    jarvis

    05/26/2021, 5:19 PM
    we are using spring webflux for our java services calling a dedicated API for each request might slow us down
  • r

    rp

    05/26/2021, 5:20 PM
    The session verification on the backend happens in a stateless manner. That is, it doens't query the core for session verification. It queries the core only for creation, refresh, recoking of sessions.
  • r

    rp

    05/26/2021, 5:20 PM
    unfortunately, we don't have support for spring webflux at the moment.
  • j

    jarvis

    05/26/2021, 5:26 PM
    According to this text: "The frontend sends the access token for each API call that requires session authentication. These API calls verify the access token and its expiry. If verification fails, the API throws a session expired error, else, execution continues." Won't by backend API need to communicate with Core for verification of access token each time?
  • r

    rp

    05/26/2021, 5:26 PM
    No. Cause the access token is a JWT. So they can be verified in a stateless manner using the public key of the private key that is used to sign them
  • j

    jarvis

    05/26/2021, 5:31 PM
    right, yes.. got it..infact my backend APIs dont need to communicate at all with core, only frontend needs to.. our frontend is in react js
  • r

    rp

    05/26/2021, 5:35 PM
    Our architecture is such that the frontend communicates with the core via your backend API domain. This is because session cookies are to be set against your API domain. To achieve this, you can run a node process that uses our NodeJS SDK, and have a reverse proxy (using Nginx) in your backend that routes all /auth/* requests to that node process.
  • j

    jarvis

    05/26/2021, 5:54 PM
    ok, since we use AWS ALB, routing can happen at that layer I guess regarding the 2nd point, we could still use javalin SDK from our java layer?
Powered by Linen
Title
j

jarvis

05/26/2021, 5:54 PM
ok, since we use AWS ALB, routing can happen at that layer I guess regarding the 2nd point, we could still use javalin SDK from our java layer?
View count: 2