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

    chenkaiC4

    05/31/2021, 4:02 AM
    @rp this is the hasura jwt config doc. https://hasura.io/docs/latest/graphql/core/auth/authentication/jwt.html#configuring-jwt-mode
  • c

    chenkaiC4

    05/31/2021, 4:07 AM
    if i solve the problem, i'd like to give a doc, because hasura+supertokens is very nice composition.
  • r

    rp

    05/31/2021, 6:17 AM
    @User I am not entirely familiar with the hasura integration as of yet. I will check it out tomorrow most probably. But @User and his team were the one to make that integration in the first place πŸ™‚ So perhaps he could answer your question.
  • g

    gusfune

    05/31/2021, 6:20 AM
    Hey @User the authentication via JWT on Hasura won't work with supertokens unless you change some settings. We implemented using Webhook, which is a different setup: https://hasura.io/docs/latest/graphql/core/auth/authentication/webhook.html You will need ofc a webhook server for that, you can use our repository: https://github.com/offscriptio/hasura-supertokens to try it out. if you have questions let me know.
  • c

    chenkaiC4

    05/31/2021, 7:58 AM
    @User thank you, i will have a try~
  • c

    chenkaiC4

    05/31/2021, 8:37 AM
    @User @User https://github.com/offscriptio/hasura-supertokens/issues/24
  • c

    chenkaiC4

    05/31/2021, 8:40 AM
    I think we can discuss this issue again. I really want to connect hasura and supertoken in the most efficient way, so that we can write a lot less curd codeπŸ˜†
  • c

    chenkaiC4

    05/31/2021, 9:02 AM
    https://github.com/supertokens/supertokens-core/issues/250#issuecomment-851330021
  • g

    gusfune

    05/31/2021, 9:29 AM
    I will check later. We currently use webhook for every action in our case due our specific use case, we had problems with JWT rotation using other providers
  • c

    chenkaiC4

    05/31/2021, 9:40 AM
    @User hi, if hasura have much tables, each table need roles for access, what you do with this problem?
  • g

    gusfune

    05/31/2021, 9:52 AM
    The authentication layer works for whole hasura, so if you have 1 or 1000 tables it doesn't change the issue. We have around 100 tables in our production environment and our webhook server runs in pretty low resources and footprint.
  • c

    chenkaiC4

    05/31/2021, 10:32 AM
    What I want to consult is that each table can specify the access rights of roles, which is a lot of work, if there are 100 tables.
  • c

    chenkaiC4

    05/31/2021, 10:33 AM
    message has been deleted
  • c

    chenkaiC4

    05/31/2021, 10:36 AM
    example: admin is inner role for root. add a test role. for every table, have to define permission for test, otherwise test role will have no right to query/insert... action
  • g

    gusfune

    05/31/2021, 10:45 AM
    Ah, this is permission modelling on Hasura. This is something you'd have to do anyway no matter how you integrate. We never got this as a bottleneck as we are modelling and growing our product, we already model permissions on the go. This part of the workflow is manual itself. Or you can do on a yml file and push, but anyway, it's not automatic.
  • c

    chenkaiC4

    05/31/2021, 10:57 AM
    @User πŸ˜† yeah, maybe we should do like you said, just one table by table as a CI way
  • g

    gusfune

    05/31/2021, 10:58 AM
    This is something you only do once anyway: set up the roles permissions. So it's not a big issue after you have the first time it done.
  • c

    chenkaiC4

    05/31/2021, 10:58 AM
    yes, you are right~
  • c

    chenkaiC4

    05/31/2021, 10:59 AM
    and combine with the Inherited Roles, we can merge multi role to just one. for hasura not really use the allowed roles list for permission check.
  • c

    chenkaiC4

    05/31/2021, 11:04 AM
    @User how about you do the composition of roles ? use Inherited Roles ?
  • g

    gusfune

    05/31/2021, 11:07 AM
    We are not using that for now. We have 4 different roles and a fallback role for logged in users without permissions. In the end we have role A, role B, role C, user and anonymous in our database.
  • c

    chenkaiC4

    05/31/2021, 11:12 AM
    i try the Inherited Roles, it works
  • c

    chenkaiC4

    05/31/2021, 11:17 AM
    @User thank your very much . i'm newbee to hasura. the webhook way providered by you can work well. and waitting @User to check/confirm the jwt logic with hasura jwt auth logic.
  • r

    rp

    05/31/2021, 11:17 AM
    thank you @User !! You are very helpful :))
  • r

    rp

    05/31/2021, 11:17 AM
    @User , I will get back to you tomorrow about this πŸ™‚
  • c

    chenkaiC4

    05/31/2021, 11:18 AM
    @User you are very helpfull tooπŸ‘
  • s

    sahil-shubham

    06/01/2021, 10:49 AM
    Hi there, is there any way to connect to the supertokens db through terminal? I just wanted to dump all the registered user data into a csv. I wasn't able to find anything in the documentation.
  • r

    rp

    06/01/2021, 10:50 AM
    Are you using the managed service version?
  • s

    sahil-shubham

    06/01/2021, 10:50 AM
    I haven't hosted supertokens myself if that is what you mean.
  • r

    rp

    06/01/2021, 10:50 AM
    got it.
Powered by Linen
Title
r

rp

06/01/2021, 10:50 AM
got it.
View count: 2